aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-01 05:55:25 +0000
committerChris Lattner <sabre@nondot.org>2006-12-01 05:55:25 +0000
commit7da3bde866889f963e98049c09c5b43cfb336d3f (patch)
treeb5f1731fd96d2e24f000d62038b4af92f0cf4406
parenta2f99b63cd6a88d57b8fe9da845aa344d060ab1b (diff)
downloadexternal_llvm-7da3bde866889f963e98049c09c5b43cfb336d3f.zip
external_llvm-7da3bde866889f963e98049c09c5b43cfb336d3f.tar.gz
external_llvm-7da3bde866889f963e98049c09c5b43cfb336d3f.tar.bz2
Fix a typo introduced by the cast patch that horribly broke a lot of vector
code. Testcase here: Transforms/ConstProp/2006-11-30-vector-cast.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32062 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index a428e74..79f0f57 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -743,7 +743,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
(SrcEltTy->isFloatingPoint() && DstEltTy->isFloatingPoint())) {
for (unsigned i = 0; i != SrcNumElts; ++i)
Result.push_back(
- ConstantExpr::getCast(Instruction::BitCast, CP->getOperand(1),
+ ConstantExpr::getCast(Instruction::BitCast, CP->getOperand(i),
DstEltTy));
return ConstantPacked::get(Result);
}