diff options
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 79e16f13ad..de8a3acdbd 100644 --- a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -279,9 +279,9 @@ Instruction *InstCombiner::visitExtractElementInst(ExtractElementInst &EI) { // Canonicalize extractelement(cast) -> cast(extractelement) // bitcasts can change the number of vector elements and they cost nothing if (CI->hasOneUse() && (CI->getOpcode() != Instruction::BitCast)) { - Value *EE = InsertNewInstWith( - ExtractElementInst::Create(CI->getOperand(0), EI.getIndexOperand()), - *CI); + Value *EE = Builder->CreateExtractElement(CI->getOperand(0), + EI.getIndexOperand()); + Worklist.AddValue(EE); return CastInst::Create(CI->getOpcode(), EE, EI.getType()); } } |