Skip to content

Commit 6759869

Browse files
committed
Add assert
1 parent 90dee58 commit 6759869

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,7 @@ class BitPermutationSelector {
16321632
default: break;
16331633
case ISD::ROTL:
16341634
if (isa<ConstantSDNode>(V.getOperand(1))) {
1635+
assert(isPowerOf2_32(NumBits) && "rotl bits should be power of 2!");
16351636
unsigned RotAmt = V.getConstantOperandVal(1) & (NumBits - 1);
16361637

16371638
const auto &LHSBits = *getValueBits(V.getOperand(0), NumBits).second;

0 commit comments

Comments
 (0)