[llvm-commits] [llvm] r158536 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Andrew Trick
atrick at apple.com
Fri Jun 15 13:07:27 PDT 2012
Author: atrick
Date: Fri Jun 15 15:07:26 2012
New Revision: 158536
URL: http://llvm.org/viewvc/llvm-project?rev=158536&view=rev
Log:
LSR fix: "Special" users are just like "Basic" users but allow -1 scale.
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=158536&r1=158535&r2=158536&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri Jun 15 15:07:26 2012
@@ -1308,8 +1308,8 @@
return !AM.BaseGV && AM.Scale == 0 && AM.BaseOffs == 0;
case LSRUse::Special:
- // Only handle -1 scales, or no scale.
- return AM.Scale == 0 || AM.Scale == -1;
+ // Special case Basic to handle -1 scales.
+ return !AM.BaseGV && (AM.Scale == 0 || AM.Scale == -1) && AM.BaseOffs == 0;
}
llvm_unreachable("Invalid LSRUse Kind!");
More information about the llvm-commits
mailing list