From 22f5dc7501b5eb97e406fd6c5e44048bb712ecc3 Mon Sep 17 00:00:00 2001 From: ManuelJBrito Date: Tue, 13 Jun 2023 14:59:38 +0100 Subject: [IR] Update to use new shufflevector semantics Update to use new shufflevector semantics for undefined values in the mask Differential Revision: https://reviews.llvm.org/D149548 --- llvm/lib/IR/ConstantFold.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/IR/ConstantFold.cpp') diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index 101e1de3..fda8bc1 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -710,9 +710,9 @@ Constant *llvm::ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, ElementCount::get(MaskNumElts, isa(V1VTy)); Type *EltTy = V1VTy->getElementType(); - // Undefined shuffle mask -> undefined value. + // Poison shuffle mask -> poison value. if (all_of(Mask, [](int Elt) { return Elt == PoisonMaskElem; })) { - return UndefValue::get(VectorType::get(EltTy, MaskEltCount)); + return PoisonValue::get(VectorType::get(EltTy, MaskEltCount)); } // If the mask is all zeros this is a splat, no need to go through all -- cgit v1.1