aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-06-24 16:54:44 +0200
committerNikita Popov <npopov@redhat.com>2024-06-24 16:56:02 +0200
commitdb9e9eabb7835bae4285a3f13c7cc7c985455e27 (patch)
treef58cbdece8eb1c3940103c29bdbc7dc744fcb270 /llvm/lib/IR/Instructions.cpp
parentb012ab01cb39e440a38dad5d7dd71b419480264b (diff)
downloadllvm-db9e9eabb7835bae4285a3f13c7cc7c985455e27.zip
llvm-db9e9eabb7835bae4285a3f13c7cc7c985455e27.tar.gz
llvm-db9e9eabb7835bae4285a3f13c7cc7c985455e27.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index f6f3876..445323f 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) {