implement PR9264: disambiguating 'bt mem, imm' as a btl.
authorChris Lattner <sabre@nondot.org>
Sat, 19 Feb 2011 21:06:36 +0000 (21:06 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 19 Feb 2011 21:06:36 +0000 (21:06 +0000)
This is reasonable to do since all bt-mem forms do the
same thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126047 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.td
test/MC/X86/x86-64.s

index 221aa2fdc33774afd657f75a237764014fcb6043..87dc4bece7420de79a6fb20b941e80e03bac2cf5 100644 (file)
@@ -1403,6 +1403,9 @@ defm : IntegerCondCodeMnemonicAlias<"cmov", "q">;
 def : InstAlias<"aad", (AAD8i8 10)>;
 def : InstAlias<"aam", (AAM8i8 10)>;
 
+// Disambiguate the mem/imm form of bt-without-a-suffix as btl.
+def : InstAlias<"bt $imm, $mem", (BT32mi8 i32mem:$mem, i32i8imm:$imm)>;
+
 // clr aliases.
 def : InstAlias<"clrb $reg", (XOR8rr  GR8 :$reg, GR8 :$reg)>;
 def : InstAlias<"clrw $reg", (XOR16rr GR16:$reg, GR16:$reg)>;
index b1fc9accfd1a9b087dacdb6acf773b61a8dbece9..c8b6414d59a6c4174e77b788b4a2eb544029cb32 100644 (file)
@@ -648,6 +648,10 @@ movl       0, %eax   // CHECK: movl 0, %eax # encoding: [0x8b,0x04,0x25,0x00,0x00,0x00
 // CHECK: encoding: [0x75,A]
         jnz 0
 
+// PR9264
+btl    $1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01]
+bt     $1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01]
+
 // rdar://8017515
 btq $0x01,%rdx
 // CHECK: btq  $1, %rdx