From d1d5693149be24c389fc573b6cdda529311ca6a9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Dec 2006 05:55:25 +0000 Subject: 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 llvm-svn: 32062 --- llvm/lib/VMCore/ConstantFolding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/VMCore/ConstantFolding.cpp') diff --git a/llvm/lib/VMCore/ConstantFolding.cpp b/llvm/lib/VMCore/ConstantFolding.cpp index a428e74bc66..79f0f577420 100644 --- a/llvm/lib/VMCore/ConstantFolding.cpp +++ b/llvm/lib/VMCore/ConstantFolding.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); } -- cgit v1.2.3