[llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.y

Reid Spencer reid at x10sys.com
Fri Jan 26 12:30:08 PST 2007



Changes in directory llvm/tools/llvm-upgrade:

UpgradeParser.y updated: 1.47 -> 1.48
---
Log message:

Make sure that an upgraded index is also inserted into the VIndices
otherwise it gets ignored. 

This fixes test/CodeGen/X86/2006-05-11-InstrSched.ll

Thanks to Evan Cheng for noticing this.



---
Diffs of the changes:  (+3 -1)

 UpgradeParser.y |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/tools/llvm-upgrade/UpgradeParser.y
diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.47 llvm/tools/llvm-upgrade/UpgradeParser.y:1.48
--- llvm/tools/llvm-upgrade/UpgradeParser.y:1.47	Fri Jan 26 13:58:59 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.y	Fri Jan 26 14:29:52 2007
@@ -1169,13 +1169,15 @@
       // all indices for SequentialType elements. We must retain the same 
       // semantic (zext) for unsigned types.
       if (const IntegerType *Ity = dyn_cast<IntegerType>(Index->getType()))
-        if (Ity->getBitWidth() < 64 && (*Indices)[i].S == Unsigned)
+        if (Ity->getBitWidth() < 64 && (*Indices)[i].S == Unsigned) {
           if (CIndices)
             Index = ConstantExpr::getCast(Instruction::ZExt, 
               cast<Constant>(Index), Type::Int64Ty);
           else
             Index = CastInst::create(Instruction::ZExt, Index, Type::Int64Ty,
               makeNameUnique("gep_upgrade"), CurBB);
+          VIndices[i] = Index;
+        }
     }
     // Add to the CIndices list, if requested.
     if (CIndices)






More information about the llvm-commits mailing list