[llvm-commits] [llvm] r65288 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Dan Gohman gohman at apple.com
Sun Feb 22 08:40:52 PST 2009


Author: djg
Date: Sun Feb 22 10:40:52 2009
New Revision: 65288

URL: http://llvm.org/viewvc/llvm-project?rev=65288&view=rev
Log:
Properly parenthesize this expression, fixing a real bug in the new
-full-lsr code, as well as a GCC warning.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=65288&r1=65287&r2=65288&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sun Feb 22 10:40:52 2009
@@ -1536,7 +1536,7 @@
     // 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;





More information about the llvm-commits mailing list