summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-02-22 16:40:52 +0000
committerDan Gohman <gohman@apple.com>2009-02-22 16:40:52 +0000
commitf394e58af589d6c198f4c8eca8f83110d8529b5b (patch)
treee1652ee6a7bd47999212927b6d602fca56da68d0 /llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
parentd853864705bcdf3431bb3b951e59f6346f17a358 (diff)
downloadbcm5719-llvm-f394e58af589d6c198f4c8eca8f83110d8529b5b.tar.gz
bcm5719-llvm-f394e58af589d6c198f4c8eca8f83110d8529b5b.zip
Properly parenthesize this expression, fixing a real bug in the new
-full-lsr code, as well as a GCC warning. llvm-svn: 65288
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 1817e583747..e32cacc4412 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -1536,7 +1536,7 @@ bool LoopStrengthReduce::ShouldUseFullStrengthReductionMode(
// strength reduction would increase register pressure.
do {
SCEV *CurImm = UsersToProcess[i].Imm;
- if (CurImm || Imm && CurImm != Imm) {
+ if ((CurImm || Imm) && CurImm != Imm) {
if (!CurImm) CurImm = SE->getIntegerSCEV(0, Stride->getType());
if (!Imm) Imm = SE->getIntegerSCEV(0, Stride->getType());
const Instruction *Inst = UsersToProcess[i].Inst;
OpenPOWER on IntegriCloud