summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-26 22:04:42 +0000
committerChris Lattner <sabre@nondot.org>2009-11-26 22:04:42 +0000
commita73ecf0b005bf15f635730aede5abd83a521a467 (patch)
treef90c97e55cab7e54470dc4ec0a88ddfd35ef5c42 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp
parent5b83ba215ddafd2faa697457e6e18bc6b2d6bc29 (diff)
downloadbcm5719-llvm-a73ecf0b005bf15f635730aede5abd83a521a467.tar.gz
bcm5719-llvm-a73ecf0b005bf15f635730aede5abd83a521a467.zip
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. llvm-svn: 89971
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 670dd1162bd..f997d60a85e 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud