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

Evan Cheng evan.cheng at apple.com
Sat Feb 21 23:31:19 PST 2009


Author: evancheng
Date: Sun Feb 22 01:31:19 2009
New Revision: 65268

URL: http://llvm.org/viewvc/llvm-project?rev=65268&view=rev
Log:
Only try to sink immediate when TLI is not null. It needs to check if immediate would fit in target addressing field.

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=65268&r1=65267&r2=65268&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sun Feb 22 01:31:19 2009
@@ -1828,7 +1828,7 @@
 
   // If all uses are addresses, consider sinking the immediate part of the
   // common expression back into uses if they can fit in the immediate fields.
-  if (HaveCommonExprs && AllUsesAreAddresses) {
+  if (TLI && HaveCommonExprs && AllUsesAreAddresses) {
     SCEVHandle NewCommon = CommonExprs;
     SCEVHandle Imm = SE->getIntegerSCEV(0, ReplacedTy);
     MoveImmediateValues(TLI, ReplacedTy, NewCommon, Imm, true, L, SE);





More information about the llvm-commits mailing list