summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-08-14 04:51:49 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-08-14 04:51:49 +0000
commit28b84ff4cec5bf2de4c1f85b85d613818175c4d4 (patch)
treeffa54ff9e9492723486fdfb44c85f56fc6380528 /lib/Transforms/InstCombine
parent7f0170c1975fe55c58f6f2a968e1fc2248732fbe (diff)
downloadllvm-28b84ff4cec5bf2de4c1f85b85d613818175c4d4.tar.gz
llvm-28b84ff4cec5bf2de4c1f85b85d613818175c4d4.tar.bz2
llvm-28b84ff4cec5bf2de4c1f85b85d613818175c4d4.tar.xz
This transform is not safe. Thanks to Eli for pointing that out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 4166636114..41d542af68 100644
--- a/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -294,14 +294,7 @@ bool InstCombiner::SimplifyAssociativeOrCommutative(BinaryOperator &I) {
I.setOperand(1, Folded);
// Conservatively clear the optional flags, since they may not be
// preserved by the reassociation.
- if (MaintainNoSignedWrap(I, C1, C2) && Op0->hasNoSignedWrap() &&
- Op1->hasNoSignedWrap()) {
- New->setHasNoSignedWrap(true);
- I.clearSubclassOptionalData();
- I.setHasNoSignedWrap(true);
- } else {
- I.clearSubclassOptionalData();
- }
+ I.clearSubclassOptionalData();
Changed = true;
continue;