projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1df3fd6
)
In my analysis for r56076 I missed the case where the original
author
Dan Gohman
<gohman@apple.com>
Thu, 11 Sep 2008 00:25:00 +0000
(
00:25
+0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 11 Sep 2008 00:25:00 +0000
(
00:25
+0000)
multiplication overflows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56082
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index 8f578200d659a73039196c97ae8824e9c48ffda7..46ac762b0a78349d3e9e6d71e91e5a3d4fabf655 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-5789,7
+5789,8
@@
Instruction *InstCombiner::FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI,
// e.g. X/-5 op -3 --> [15, 20)
LoBound = Prod;
LoOverflow = HiOverflow = ProdOV ? 1 : 0;
- HiOverflow = SubWithOverflow(HiBound, Prod, DivRHS, true);
+ if (!HiOverflow)
+ HiOverflow = SubWithOverflow(HiBound, Prod, DivRHS, true);
}
// Dividing by a negative swaps the condition. LT <-> GT