Skip to content

Commit 146295e

Browse files
committed
add assert
1 parent 34f407f commit 146295e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16807,6 +16807,11 @@ static void knownBitsForSBFE(const MachineInstr &MI, GISelValueTracking &VT,
1680716807
Src1Cst & maskTrailingOnes<unsigned>((BFEWidth == 32) ? 5 : 6);
1680816808
const unsigned Width = (Src1Cst >> 16) & maskTrailingOnes<unsigned>(6);
1680916809

16810+
if (Width >= BFEWidth) {
16811+
assert(false && "Invalid S_BFE");
16812+
return;
16813+
}
16814+
1681016815
VT.computeKnownBitsImpl(MI.getOperand(1).getReg(), Known, DemandedElts,
1681116816
Depth + 1);
1681216817

0 commit comments

Comments
 (0)