PR18931, PATCH: Crash using integrated assembler with immediate arithmetic
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Mar 25 11:05:58 PDT 2014
The test should be in MC, not CodeGen.
+ // CHECK: #1
Can you expand it a bit For example:
// CHECK: cmp r2, #1
+ // We expect MO to be immediate,
The comment is not exactly right with the patch. We expect it to be an
expression or an immediate.
+ if (!MO.isImm()) {
+ assert(MO.isExpr() && "Unexpected operand type!");
You can probably just use
if (MO.isExpr()) {
the "MO.getImm();" afterwards takes care of the assert that we only
have expressions or immediates.
Cheers,
Rafael
More information about the llvm-commits
mailing list