summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-26 20:29:52 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-26 20:29:52 +0000
commit62b741dc4c0c3764b1d0d7893fc562547c69dfe3 (patch)
tree0843d907b5b352e706f919fcaa4e7bd50618a22a
parent41210fb2dc500f3fc5fc58114aa6579c8f632c60 (diff)
downloadbcm5719-llvm-62b741dc4c0c3764b1d0d7893fc562547c69dfe3.tar.gz
bcm5719-llvm-62b741dc4c0c3764b1d0d7893fc562547c69dfe3.zip
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. llvm-svn: 33546
-rw-r--r--llvm/tools/llvm-upgrade/UpgradeParser.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-upgrade/UpgradeParser.y b/llvm/tools/llvm-upgrade/UpgradeParser.y
index 14183a40cbc..30d72711153 100644
--- a/llvm/tools/llvm-upgrade/UpgradeParser.y
+++ b/llvm/tools/llvm-upgrade/UpgradeParser.y
@@ -1169,13 +1169,15 @@ const Type* upgradeGEPIndices(const Type* PTy,
// 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)
OpenPOWER on IntegriCloud