Skip to content

Commit e771bfc

Browse files
committed
add test for invalid usage
1 parent 0da7033 commit e771bfc

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,7 @@ void PPCInstPrinter::printS32ImmOperand(const MCInst *MI, unsigned OpNo,
437437
long long Value = MI->getOperand(OpNo).getImm();
438438
assert(isInt<32>(Value) && "Invalid s32imm argument!");
439439
O << (long long)Value;
440-
}
441-
else
440+
} else
442441
printOperand(MI, OpNo, STI, O);
443442
}
444443

llvm/test/MC/PowerPC/ppc64-encoding-ISA31-errors.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
paddi 1, 1, 32, 1
88

99
# CHECK: error: invalid operand for instruction
10-
pld 1, 32(1), 1
10+
paddis 10, 5, 1000000000, 1
1111

1212
# CHECK: error: invalid operand for instruction
13-
paddi 1, 1, 32, 1
13+
pld 1, 32(1), 1
1414

1515
# CHECK: error: invalid operand for instruction
1616
plbz 1, 32(1), 1

0 commit comments

Comments
 (0)