summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 84b117de21e..a6cd8331008 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -808,7 +808,7 @@ Constant *llvm::ConstantFoldExtractElementInstruction(Constant *Val,
for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) {
Constant *Op = CE->getOperand(i);
if (Op->getType()->isVectorTy()) {
- Constant *ScalarOp = ConstantFoldExtractElementInstruction(Op, Idx);
+ Constant *ScalarOp = ConstantExpr::getExtractElement(Op, Idx);
if (!ScalarOp)
return nullptr;
Ops.push_back(ScalarOp);
OpenPOWER on IntegriCloud