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

Dan Gohman gohman at apple.com
Mon Mar 9 14:22:12 PDT 2009


Author: djg
Date: Mon Mar  9 16:22:12 2009
New Revision: 66470

URL: http://llvm.org/viewvc/llvm-project?rev=66470&view=rev
Log:
Fix a few more places where induction variable types were used
where memory access types are needed.

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=66470&r1=66469&r2=66470&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Mar  9 16:22:12 2009
@@ -1834,7 +1834,7 @@
   if (TLI && HaveCommonExprs && AllUsesAreAddresses) {
     SCEVHandle NewCommon = CommonExprs;
     SCEVHandle Imm = SE->getIntegerSCEV(0, ReplacedTy);
-    MoveImmediateValues(TLI, ReplacedTy, NewCommon, Imm, true, L, SE);
+    MoveImmediateValues(TLI, Type::VoidTy, NewCommon, Imm, true, L, SE);
     if (!Imm->isZero()) {
       bool DoSink = true;
 
@@ -1933,7 +1933,7 @@
     // this by forcing a BitCast (noop cast) to be inserted into the preheader 
     // in this case.
     if (Constant *C = dyn_cast<Constant>(BaseV)) {
-      if (!C->isNullValue() && !fitsInAddressMode(Base, ReplacedTy, 
+      if (!C->isNullValue() && !fitsInAddressMode(Base, getAccessType(Inst),
                                                  TLI, false)) {
         // We want this constant emitted into the preheader! This is just
         // using cast as a copy so BitCast (no-op cast) is appropriate





More information about the llvm-commits mailing list