[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Reid Spencer
reid at x10sys.com
Mon Dec 4 12:33:02 CST 2006
On Mon, 2006-12-04 at 10:22 -0800, Chris Lattner wrote:
> > // If this is another cast that can be eliminated, it isn't
> > codegen either.
> > if (const CastInst *CI = dyn_cast<CastInst>(V))
> > - if (isEliminableCastPair(CI, CastInst::getCastOpcode(V, Ty),
> > Ty, TD))
> > + if (isEliminableCastPair(CI, CastInst::getCastOpcode(
> > + V, V->getType()->isSigned(), Ty, Ty->isSigned()), Ty,
> > TD))
> > return false;
> > return true;
> > }
>
> Won't this miscompile stuff like:
>
> %B = zext sbyte %A to ushort
> %C = zext ushort %B to uint
>
> into a sext?
No. This patch doesn't change anything. The only reason for this change
is the change in signature for getCastOpcode. See the corresponding
change in getCastOpcode. This passed everything on Linux last night
before I committed it.
Reid.
>
> -Chris
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20061204/4eafd3eb/attachment.bin
More information about the llvm-commits
mailing list