mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 04:56:07 +00:00
[IR] Fix UB on Op<2> in ShuffleVector predicates (#75549)
This Op<2> usage was missed in 1ee6ec2bf3, which replaced the third shuffle operand with a vector of integer mask constants. I noticed this when attempting to make changes to the layout of llvm::Value.
This commit is contained in:
parent
414d27419f
commit
04b8c830d3
@ -2412,9 +2412,6 @@ bool ShuffleVectorInst::isInsertSubvectorMask(ArrayRef<int> Mask,
|
||||
}
|
||||
|
||||
bool ShuffleVectorInst::isIdentityWithPadding() const {
|
||||
if (isa<UndefValue>(Op<2>()))
|
||||
return false;
|
||||
|
||||
// FIXME: Not currently possible to express a shuffle mask for a scalable
|
||||
// vector for this case.
|
||||
if (isa<ScalableVectorType>(getType()))
|
||||
@ -2439,9 +2436,6 @@ bool ShuffleVectorInst::isIdentityWithPadding() const {
|
||||
}
|
||||
|
||||
bool ShuffleVectorInst::isIdentityWithExtract() const {
|
||||
if (isa<UndefValue>(Op<2>()))
|
||||
return false;
|
||||
|
||||
// FIXME: Not currently possible to express a shuffle mask for a scalable
|
||||
// vector for this case.
|
||||
if (isa<ScalableVectorType>(getType()))
|
||||
@ -2457,8 +2451,7 @@ bool ShuffleVectorInst::isIdentityWithExtract() const {
|
||||
|
||||
bool ShuffleVectorInst::isConcat() const {
|
||||
// Vector concatenation is differentiated from identity with padding.
|
||||
if (isa<UndefValue>(Op<0>()) || isa<UndefValue>(Op<1>()) ||
|
||||
isa<UndefValue>(Op<2>()))
|
||||
if (isa<UndefValue>(Op<0>()) || isa<UndefValue>(Op<1>()))
|
||||
return false;
|
||||
|
||||
// FIXME: Not currently possible to express a shuffle mask for a scalable
|
||||
|
Loading…
x
Reference in New Issue
Block a user