[llvm] db9e9ea - [IR] Generate poison for all-poison scalable shufflevector mask
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 07:56:13 PDT 2024
Author: Nikita Popov
Date: 2024-06-24T16:56:02+02:00
New Revision: db9e9eabb7835bae4285a3f13c7cc7c985455e27
URL: https://github.com/llvm/llvm-project/commit/db9e9eabb7835bae4285a3f13c7cc7c985455e27
DIFF: https://github.com/llvm/llvm-project/commit/db9e9eabb7835bae4285a3f13c7cc7c985455e27.diff
LOG: [IR] Generate poison for all-poison scalable shufflevector mask
Ultimately doesn't matter because the bitcode reader interprets
undef and poison interchangeably in this context.
Added:
Modified:
llvm/lib/IR/Instructions.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index f6f3876efdea4..445323f2a085b 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -1822,7 +1822,7 @@ Constant *ShuffleVectorInst::convertShuffleMaskForBitcode(ArrayRef<int> Mask,
Type *VecTy = VectorType::get(Int32Ty, Mask.size(), true);
if (Mask[0] == 0)
return Constant::getNullValue(VecTy);
- return UndefValue::get(VecTy);
+ return PoisonValue::get(VecTy);
}
SmallVector<Constant *, 16> MaskConst;
for (int Elem : Mask) {
More information about the llvm-commits
mailing list