Condition codes AL and NV are invalid in the aliases that use
[oota-llvm.git] / lib / Target / AArch64 / AArch64InstrFormats.td
index 42326fc182bc7453ae44d94c1503e6a5202ef150..446149b4fb0ddc2c6d7c07e79b1c64436c008081 100644 (file)
@@ -963,8 +963,14 @@ def ccode : Operand<i32> {
   let ParserMatchClass = CondCode;
 }
 def inv_ccode : Operand<i32> {
+  // AL and NV are invalid in the aliases which use inv_ccode
   let PrintMethod = "printInverseCondCode";
   let ParserMatchClass = CondCode;
+  let MCOperandPredicate = [{
+    return MCOp.isImm() &&
+           MCOp.getImm() != AArch64CC::AL &&
+           MCOp.getImm() != AArch64CC::NV;
+  }];
 }
 
 // Conditional branch target. 19-bit immediate. The low two bits of the target