From 7da3bde866889f963e98049c09c5b43cfb336d3f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Dec 2006 05:55:25 +0000 Subject: [PATCH] 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 --- lib/VMCore/ConstantFold.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index a428e74bc66..79f0f577420 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); } -- 2.34.1