From 7c69a03c56601a55f47f29ea59e33c37e62db556 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 6 Dec 2019 12:33:46 -0800 Subject: [ConstantFold][SVE] Fix constant folding for shufflevector. Don't try to fold away shuffles which can't be folded. Fix creation of shufflevector constant expressions. Differential Revision: https://reviews.llvm.org/D71147 --- llvm/lib/IR/ConstantsContext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/IR/ConstantsContext.h') diff --git a/llvm/lib/IR/ConstantsContext.h b/llvm/lib/IR/ConstantsContext.h index 1ec9087551f..f5e2481f390 100644 --- a/llvm/lib/IR/ConstantsContext.h +++ b/llvm/lib/IR/ConstantsContext.h @@ -149,7 +149,7 @@ public: ShuffleVectorConstantExpr(Constant *C1, Constant *C2, Constant *C3) : ConstantExpr(VectorType::get( cast(C1->getType())->getElementType(), - cast(C3->getType())->getNumElements()), + cast(C3->getType())->getElementCount()), Instruction::ShuffleVector, &Op<0>(), 3) { Op<0>() = C1; -- cgit v1.2.3