aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorManuelJBrito <manuel.brito@tecnico.ulisboa.pt>2023-06-13 14:59:38 +0100
committerManuelJBrito <manuel.brito@tecnico.ulisboa.pt>2023-06-13 17:12:04 +0100
commit22f5dc7501b5eb97e406fd6c5e44048bb712ecc3 (patch)
treebd97eaa2b0049b222e31a65eebdd1d120a1be5e7 /llvm/lib/IR/ConstantFold.cpp
parent14914fb1573f0393979492238735beecde65b3bb (diff)
downloadllvm-22f5dc7501b5eb97e406fd6c5e44048bb712ecc3.zip
llvm-22f5dc7501b5eb97e406fd6c5e44048bb712ecc3.tar.gz
llvm-22f5dc7501b5eb97e406fd6c5e44048bb712ecc3.tar.bz2
[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
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp4
1 files changed, 2 insertions, 2 deletions
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<ScalableVectorType>(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