Add TEST8ri_NOREX pseudo to constrain sub_8bit_hi copies.
[oota-llvm.git] / lib / Target / X86 / X86InstrArithmetic.td
index 6d2c53495cf33955cfb784707d47c0df64868e1a..f6ed722c071194da6f57ad2adc0cec400d187c06 100644 (file)
@@ -1145,5 +1145,11 @@ let Defs = [EFLAGS] in {
                            "{$src, %eax|EAX, $src}">;
   def TEST64i32  : BinOpAI<0xA8, "test", Xi64, RAX,
                            "{$src, %rax|RAX, $src}">;
+
+  // When testing the result of EXTRACT_SUBREG sub_8bit_hi, make sure the
+  // register class is constrained to GR8_NOREX.
+  let isPseudo = 1 in
+  def TEST8ri_NOREX : I<0, Pseudo, (outs), (ins GR8_NOREX:$src, i8imm:$mask),
+                        "", []>;
 }