[llvm] r366133 - [mips] Print BEQZL and BNEZL pseudo instructions
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 14:46:38 PDT 2019
Author: atanasyan
Date: Mon Jul 15 14:46:38 2019
New Revision: 366133
URL: http://llvm.org/viewvc/llvm-project?rev=366133&view=rev
Log:
[mips] Print BEQZL and BNEZL pseudo instructions
One of the reasons - to be compatible with GNU tools.
Modified:
llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
llvm/trunk/test/MC/Mips/branch-pseudos.s
llvm/trunk/test/MC/Mips/macro-bcc-imm.s
llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s
Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.td?rev=366133&r1=366132&r2=366133&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td Mon Jul 15 14:46:38 2019
@@ -2801,14 +2801,14 @@ let AdditionalPredicates = [NotInMicroMi
def : MipsInstAlias<"bnez $rs,$offset",
(BNE GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>,
ISA_MIPS1;
- def : MipsInstAlias<"bnezl $rs,$offset",
- (BNEL GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>,
+ def : MipsInstAlias<"bnezl $rs, $offset",
+ (BNEL GPR32Opnd:$rs, ZERO, brtarget:$offset), 1>,
ISA_MIPS2;
def : MipsInstAlias<"beqz $rs,$offset",
(BEQ GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>,
ISA_MIPS1;
- def : MipsInstAlias<"beqzl $rs,$offset",
- (BEQL GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>,
+ def : MipsInstAlias<"beqzl $rs, $offset",
+ (BEQL GPR32Opnd:$rs, ZERO, brtarget:$offset), 1>,
ISA_MIPS2;
def : MipsInstAlias<"syscall", (SYSCALL 0), 1>, ISA_MIPS1;
Modified: llvm/trunk/test/MC/Mips/branch-pseudos.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/branch-pseudos.s?rev=366133&r1=366132&r2=366133&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/branch-pseudos.s (original)
+++ llvm/trunk/test/MC/Mips/branch-pseudos.s Mon Jul 15 14:46:38 2019
@@ -190,12 +190,12 @@ local_label:
bltl $7,$8,local_label
# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
-# CHECK: bnel $1, $zero, local_label # encoding: [0x54,0x20,A,A]
+# CHECK: bnezl $1, local_label # encoding: [0x54,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bltl $7,$8,global_label
# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
-# CHECK: bnel $1, $zero, global_label # encoding: [0x54,0x20,A,A]
+# CHECK: bnezl $1, global_label # encoding: [0x54,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bltl $7,$0,local_label
@@ -211,12 +211,12 @@ local_label:
blel $7,$8,local_label
# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
-# CHECK: beql $1, $zero, local_label # encoding: [0x50,0x20,A,A]
+# CHECK: beqzl $1, local_label # encoding: [0x50,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
blel $7,$8,global_label
# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
-# CHECK: beql $1, $zero, global_label # encoding: [0x50,0x20,A,A]
+# CHECK: beqzl $1, global_label # encoding: [0x50,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
blel $7,$0,local_label
@@ -235,12 +235,12 @@ local_label:
bgel $7,$8,local_label
# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
-# CHECK: beql $1, $zero, local_label # encoding: [0x50,0x20,A,A]
+# CHECK: beqzl $1, local_label # encoding: [0x50,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bgel $7,$8,global_label
# CHECK: slt $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2a]
-# CHECK: beql $1, $zero, global_label # encoding: [0x50,0x20,A,A]
+# CHECK: beqzl $1, global_label # encoding: [0x50,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bgel $7,$0,local_label
@@ -259,12 +259,12 @@ local_label:
bgtl $7,$8,local_label
# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
-# CHECK: bnel $1, $zero, local_label # encoding: [0x54,0x20,A,A]
+# CHECK: bnezl $1, local_label # encoding: [0x54,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bgtl $7,$8,global_label
# CHECK: slt $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2a]
-# CHECK: bnel $1, $zero, global_label # encoding: [0x54,0x20,A,A]
+# CHECK: bnezl $1, global_label # encoding: [0x54,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bgtl $7,$0,local_label
@@ -280,12 +280,12 @@ local_label:
bltul $7,$8,local_label
# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
-# CHECK: bnel $1, $zero, local_label # encoding: [0x54,0x20,A,A]
+# CHECK: bnezl $1, local_label # encoding: [0x54,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bltul $7,$8,global_label
# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
-# CHECK: bnel $1, $zero, global_label # encoding: [0x54,0x20,A,A]
+# CHECK: bnezl $1, global_label # encoding: [0x54,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bltul $7,$0,local_label
@@ -301,12 +301,12 @@ local_label:
bleul $7,$8,local_label
# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
-# CHECK: beql $1, $zero, local_label # encoding: [0x50,0x20,A,A]
+# CHECK: beqzl $1, local_label # encoding: [0x50,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bleul $7,$8,global_label
# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
-# CHECK: beql $1, $zero, global_label # encoding: [0x50,0x20,A,A]
+# CHECK: beqzl $1, global_label # encoding: [0x50,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bleul $7,$0,local_label
@@ -325,12 +325,12 @@ local_label:
bgeul $7,$8,local_label
# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
-# CHECK: beql $1, $zero, local_label # encoding: [0x50,0x20,A,A]
+# CHECK: beqzl $1, local_label # encoding: [0x50,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bgeul $7,$8,global_label
# CHECK: sltu $1, $7, $8 # encoding: [0x00,0xe8,0x08,0x2b]
-# CHECK: beql $1, $zero, global_label # encoding: [0x50,0x20,A,A]
+# CHECK: beqzl $1, global_label # encoding: [0x50,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bgeul $7,$0,local_label
@@ -349,12 +349,12 @@ local_label:
bgtul $7,$8,local_label
# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
-# CHECK: bnel $1, $zero, local_label # encoding: [0x54,0x20,A,A]
+# CHECK: bnezl $1, local_label # encoding: [0x54,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: local_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bgtul $7,$8,global_label
# CHECK: sltu $1, $8, $7 # encoding: [0x01,0x07,0x08,0x2b]
-# CHECK: bnel $1, $zero, global_label # encoding: [0x54,0x20,A,A]
+# CHECK: bnezl $1, global_label # encoding: [0x54,0x20,A,A]
# CHECK: # fixup A - offset: 0, value: global_label-4, kind: fixup_Mips_PC16
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
bgtul $7,$0,local_label
Modified: llvm/trunk/test/MC/Mips/macro-bcc-imm.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/macro-bcc-imm.s?rev=366133&r1=366132&r2=366133&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/macro-bcc-imm.s (original)
+++ llvm/trunk/test/MC/Mips/macro-bcc-imm.s Mon Jul 15 14:46:38 2019
@@ -75,33 +75,33 @@ foo:
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
bltl $a2, 16, foo # ALL: addiu $1, $zero, 16
# ALL: slt $1, $6, $1
- # ALL: bnel $1, $zero, foo
+ # ALL: bnezl $1, foo
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
blel $a2, 16, foo # ALL: addiu $1, $zero, 16
# ALL: slt $1, $1, $6
- # ALL: beql $1, $zero, foo
+ # ALL: beqzl $1, foo
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
bgel $a2, 32767, foo # ALL: addiu $1, $zero, 32767
# ALL: slt $1, $6, $1
- # ALL: beql $1, $zero, foo
+ # ALL: beqzl $1, foo
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
bgtl $a2, 32768, foo # ALL: ori $1, $zero, 32768
# ALL: slt $1, $1, $6
- # ALL: bnel $1, $zero, foo
+ # ALL: bnezl $1, foo
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
bltul $a2, 16, foo # ALL: addiu $1, $zero, 16
# ALL: sltu $1, $6, $1
- # ALL: bnel $1, $zero, foo
+ # ALL: bnezl $1, foo
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
bleul $a2, 16, foo # ALL: addiu $1, $zero, 16
# ALL: sltu $1, $1, $6
- # ALL: beql $1, $zero, foo
+ # ALL: beqzl $1, foo
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
bgeul $a2, 32767, foo # ALL: addiu $1, $zero, 32767
# ALL: sltu $1, $6, $1
- # ALL: beql $1, $zero, foo
+ # ALL: beqzl $1, foo
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
bgtul $a2, 65536, foo # ALL: lui $1, 1
# ALL: sltu $1, $1, $6
- # ALL: bnel $1, $zero, foo
+ # ALL: bnezl $1, foo
# ALL: # fixup A - offset: 0, value: foo-4, kind: fixup_Mips_PC16
Modified: llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s?rev=366133&r1=366132&r2=366133&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s (original)
+++ llvm/trunk/test/MC/Mips/mips-jump-delay-slots.s Mon Jul 15 14:46:38 2019
@@ -67,13 +67,13 @@
# CHECK: beql $9, $6, 1332
# CHECK: nop
beql $9,$6,1332
- # CHECK: beql $9, $zero, 1332
+ # CHECK: beqzl $9, 1332
# CHECK: nop
beqzl $9,1332
# CHECK: bnel $9, $6, 1332
# CHECK: nop
bnel $9,$6,1332
- # CHECK: bnel $9, $zero, 1332
+ # CHECK: bnezl $9, 1332
# CHECK: nop
bnezl $9,1332
# CHECK: bgezl $6, 1332
More information about the llvm-commits
mailing list