Index: llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp =================================================================== --- llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp +++ llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp @@ -1138,6 +1138,7 @@ // representation for the complex operand in the .td file. This isn't just // style, unfortunately. As-is, we can't represent the distinct encoding // for #-0. + assert(((Imm8 & 0x3) == 0) && "Not a valid immediate!"); uint32_t Binary = (Imm8 >> 2) & 0xff; // Immediate is always encoded as positive. The 'U' bit controls add vs sub. if (isAdd)