forked from OSchip/llvm-project
[RISCV][ISel] Attempt to fix UBSan error
Explicitly check an SDValue with the invalid SDValue. UBSan reports: runtime error: load of value 36, which is not a valid value for type 'bool' https://lab.llvm.org/buildbot/#/builders/85/builds/11231
This commit is contained in:
parent
c5c2de287e
commit
6bbe7d376e
|
@ -8491,7 +8491,9 @@ struct NodeExtensionHelper {
|
|||
}
|
||||
|
||||
/// Check if this operand is compatible with the given vector length \p VL.
|
||||
bool isVLCompatible(SDValue VL) const { return this->VL && this->VL == VL; }
|
||||
bool isVLCompatible(SDValue VL) const {
|
||||
return this->VL != SDValue() && this->VL == VL;
|
||||
}
|
||||
|
||||
/// Check if this operand is compatible with the given \p Mask.
|
||||
bool isMaskCompatible(SDValue Mask) const {
|
||||
|
|
Loading…
Reference in New Issue