diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-26 22:04:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-26 22:04:42 +0000 |
commit | 21f83a2f95c30b21398b6db0f80ac7eb0b4b672a (patch) | |
tree | b86b2dfc147ef024a2322c1b11157cd2f227fd0e /lib | |
parent | 2bbac75e5a3317b45b2b2cd6a51b1ab33e0b4518 (diff) | |
download | external_llvm-21f83a2f95c30b21398b6db0f80ac7eb0b4b672a.zip external_llvm-21f83a2f95c30b21398b6db0f80ac7eb0b4b672a.tar.gz external_llvm-21f83a2f95c30b21398b6db0f80ac7eb0b4b672a.tar.bz2 |
Fix PR5471 by removing an instcombine xform. Some pieces of the code
generates store to undef and some generates store to null as the idiom
for undefined behavior. Since simplifycfg zaps both, don't remove the
undefined behavior in instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 670dd11..f997d60 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -12096,12 +12096,6 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) { Value *Val = SI.getOperand(0); Value *Ptr = SI.getOperand(1); - if (isa<UndefValue>(Ptr)) { // store X, undef -> noop (even if volatile) - EraseInstFromFunction(SI); - ++NumCombined; - return 0; - } - // If the RHS is an alloca with a single use, zapify the store, making the // alloca dead. // If the RHS is an alloca with a two uses, the other one being a |