diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 20:29:52 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 20:29:52 +0000 |
commit | 8f78af9f8f4d464d6627a056087a69c1be3b58b7 (patch) | |
tree | 36a3ce4d3456d17d61886f82148b59c02d044fcf /tools/llvm-upgrade/UpgradeParser.y | |
parent | d7c4f8ceff83ff0c5b4dd758c82e0896a7868b69 (diff) | |
download | llvm-8f78af9f8f4d464d6627a056087a69c1be3b58b7.tar.gz llvm-8f78af9f8f4d464d6627a056087a69c1be3b58b7.tar.bz2 llvm-8f78af9f8f4d464d6627a056087a69c1be3b58b7.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-upgrade/UpgradeParser.y')
-rw-r--r-- | tools/llvm-upgrade/UpgradeParser.y | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y index 14183a40cb..30d7271115 100644 --- a/tools/llvm-upgrade/UpgradeParser.y +++ b/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) |