[llvm] r368127 - [X86] Allow any 8-bit immediate to be used with bt/btc/btr/bts memory aliases.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 23:17:58 PDT 2019
Author: ctopper
Date: Tue Aug 6 23:17:58 2019
New Revision: 368127
URL: http://llvm.org/viewvc/llvm-project?rev=368127&view=rev
Log:
[X86] Allow any 8-bit immediate to be used with bt/btc/btr/bts memory aliases.
We have aliases that disambiguate memory forms of bt/btc/btr/bts
without suffixes to the 32-bit form. These aliases should have
been updated when the instructions were updated in r356413.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.td
llvm/trunk/test/MC/X86/x86-32-coverage.s
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=368127&r1=368126&r2=368127&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Aug 6 23:17:58 2019
@@ -3219,13 +3219,13 @@ def : InstAlias<"aam", (AAM8i8 10)>, Req
// Disambiguate the mem/imm form of bt-without-a-suffix as btl.
// Likewise for btc/btr/bts.
def : InstAlias<"bt\t{$imm, $mem|$mem, $imm}",
- (BT32mi8 i32mem:$mem, i32i8imm:$imm), 0, "att">;
+ (BT32mi8 i32mem:$mem, i32u8imm:$imm), 0, "att">;
def : InstAlias<"btc\t{$imm, $mem|$mem, $imm}",
- (BTC32mi8 i32mem:$mem, i32i8imm:$imm), 0, "att">;
+ (BTC32mi8 i32mem:$mem, i32u8imm:$imm), 0, "att">;
def : InstAlias<"btr\t{$imm, $mem|$mem, $imm}",
- (BTR32mi8 i32mem:$mem, i32i8imm:$imm), 0, "att">;
+ (BTR32mi8 i32mem:$mem, i32u8imm:$imm), 0, "att">;
def : InstAlias<"bts\t{$imm, $mem|$mem, $imm}",
- (BTS32mi8 i32mem:$mem, i32i8imm:$imm), 0, "att">;
+ (BTS32mi8 i32mem:$mem, i32u8imm:$imm), 0, "att">;
// clr aliases.
def : InstAlias<"clr{b}\t$reg", (XOR8rr GR8 :$reg, GR8 :$reg), 0>;
Modified: llvm/trunk/test/MC/X86/x86-32-coverage.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-32-coverage.s?rev=368127&r1=368126&r2=368127&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86-32-coverage.s (original)
+++ llvm/trunk/test/MC/X86/x86-32-coverage.s Tue Aug 6 23:17:58 2019
@@ -10576,15 +10576,19 @@ blendvps %xmm0, (%eax), %xmm1
// CHECK: btcw $4, (%eax)
// CHECK: btcl $4, (%eax)
bt $4, (%eax)
+bt $255, (%eax)
btw $4, (%eax)
btl $4, (%eax)
bts $4, (%eax)
+bts $255, (%eax)
btsw $4, (%eax)
btsl $4, (%eax)
btr $4, (%eax)
+btr $255, (%eax)
btrw $4, (%eax)
btrl $4, (%eax)
btc $4, (%eax)
+btc $255, (%eax)
btcw $4, (%eax)
btcl $4, (%eax)
More information about the llvm-commits
mailing list