[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
clattner at apple.com
Mon Dec 4 10:22:47 PST 2006
> Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
> diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.557
> llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.558
> --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.557 Fri
> Dec 1 18:13:08 2006
> +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Dec 3
> 20:48:01 2006
> @@ -388,7 +388,8 @@
>
> // 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?
-Chris
More information about the llvm-commits
mailing list