mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
[mips] Add microMIPS case to the tests and regenerate assertions using update_llc_test_checks.py. NFC
llvm-svn: 337004
This commit is contained in:
parent
642e2e539c
commit
b00ea3d4df
@ -1,10 +1,64 @@
|
||||
; RUN: llc -march=mipsel -enable-shrink-wrap=false < %s | FileCheck %s
|
||||
; RUN: llc -march=mips64el -enable-shrink-wrap=false < %s | FileCheck %s
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
|
||||
; CHECK-LABEL: test_blez:
|
||||
; CHECK: blez ${{[0-9]+}}, {{\$|\.L}}BB
|
||||
; Test that blez/ bgez are selected.
|
||||
; RUN: llc -mtriple=mipsel-mti-linux-gnu < %s | FileCheck %s --check-prefix=MIPS32
|
||||
; RUN: llc -mtriple=mips64el-mti-linux-gnu < %s | FileCheck %s --check-prefix=MIPS64
|
||||
; RUN: llc -mtriple=mipsel-mti-linux-gnu -mattr=+micromips < %s | FileCheck %s --check-prefix=MM
|
||||
|
||||
define void @test_blez(i32 %a) {
|
||||
; MIPS32-LABEL: test_blez:
|
||||
; MIPS32: # %bb.0: # %entry
|
||||
; MIPS32-NEXT: blez $4, $BB0_2
|
||||
; MIPS32-NEXT: nop
|
||||
; MIPS32-NEXT: # %bb.1: # %if.then
|
||||
; MIPS32-NEXT: addiu $sp, $sp, -24
|
||||
; MIPS32-NEXT: .cfi_def_cfa_offset 24
|
||||
; MIPS32-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
|
||||
; MIPS32-NEXT: .cfi_offset 31, -4
|
||||
; MIPS32-NEXT: jal foo1
|
||||
; MIPS32-NEXT: nop
|
||||
; MIPS32-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
|
||||
; MIPS32-NEXT: addiu $sp, $sp, 24
|
||||
; MIPS32-NEXT: $BB0_2: # %if.end
|
||||
; MIPS32-NEXT: jr $ra
|
||||
; MIPS32-NEXT: nop
|
||||
;
|
||||
; MIPS64-LABEL: test_blez:
|
||||
; MIPS64: # %bb.0: # %entry
|
||||
; MIPS64-NEXT: sll $1, $4, 0
|
||||
; MIPS64-NEXT: blez $1, .LBB0_2
|
||||
; MIPS64-NEXT: nop
|
||||
; MIPS64-NEXT: # %bb.1: # %if.then
|
||||
; MIPS64-NEXT: daddiu $sp, $sp, -16
|
||||
; MIPS64-NEXT: .cfi_def_cfa_offset 16
|
||||
; MIPS64-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill
|
||||
; MIPS64-NEXT: .cfi_offset 31, -8
|
||||
; MIPS64-NEXT: jal foo1
|
||||
; MIPS64-NEXT: nop
|
||||
; MIPS64-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload
|
||||
; MIPS64-NEXT: daddiu $sp, $sp, 16
|
||||
; MIPS64-NEXT: .LBB0_2: # %if.end
|
||||
; MIPS64-NEXT: jr $ra
|
||||
; MIPS64-NEXT: nop
|
||||
;
|
||||
; MM-LABEL: test_blez:
|
||||
; MM: # %bb.0: # %entry
|
||||
; MM-NEXT: blez $4, $BB0_3
|
||||
; MM-NEXT: nop
|
||||
; MM-NEXT: # %bb.1: # %entry
|
||||
; MM-NEXT: j $BB0_2
|
||||
; MM-NEXT: nop
|
||||
; MM-NEXT: $BB0_2: # %if.then
|
||||
; MM-NEXT: addiu $sp, $sp, -24
|
||||
; MM-NEXT: .cfi_def_cfa_offset 24
|
||||
; MM-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
|
||||
; MM-NEXT: .cfi_offset 31, -4
|
||||
; MM-NEXT: jal foo1
|
||||
; MM-NEXT: nop
|
||||
; MM-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
|
||||
; MM-NEXT: addiu $sp, $sp, 24
|
||||
; MM-NEXT: $BB0_3: # %if.end
|
||||
; MM-NEXT: jrc $ra
|
||||
entry:
|
||||
%cmp = icmp sgt i32 %a, 0
|
||||
br i1 %cmp, label %if.then, label %if.end
|
||||
@ -19,10 +73,63 @@ if.end:
|
||||
|
||||
declare void @foo1()
|
||||
|
||||
; CHECK-LABEL: test_bgez:
|
||||
; CHECK: bgez ${{[0-9]+}}, {{\$|\.L}}BB
|
||||
|
||||
define void @test_bgez(i32 %a) {
|
||||
; MIPS32-LABEL: test_bgez:
|
||||
; MIPS32: # %bb.0: # %entry
|
||||
; MIPS32-NEXT: bltz $4, $BB1_2
|
||||
; MIPS32-NEXT: nop
|
||||
; MIPS32-NEXT: # %bb.1: # %if.end
|
||||
; MIPS32-NEXT: jr $ra
|
||||
; MIPS32-NEXT: nop
|
||||
; MIPS32-NEXT: $BB1_2: # %if.then
|
||||
; MIPS32-NEXT: addiu $sp, $sp, -24
|
||||
; MIPS32-NEXT: .cfi_def_cfa_offset 24
|
||||
; MIPS32-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
|
||||
; MIPS32-NEXT: .cfi_offset 31, -4
|
||||
; MIPS32-NEXT: jal foo1
|
||||
; MIPS32-NEXT: nop
|
||||
; MIPS32-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
|
||||
; MIPS32-NEXT: jr $ra
|
||||
; MIPS32-NEXT: addiu $sp, $sp, 24
|
||||
;
|
||||
; MIPS64-LABEL: test_bgez:
|
||||
; MIPS64: # %bb.0: # %entry
|
||||
; MIPS64-NEXT: sll $1, $4, 0
|
||||
; MIPS64-NEXT: bltz $1, .LBB1_2
|
||||
; MIPS64-NEXT: nop
|
||||
; MIPS64-NEXT: # %bb.1: # %if.end
|
||||
; MIPS64-NEXT: jr $ra
|
||||
; MIPS64-NEXT: nop
|
||||
; MIPS64-NEXT: .LBB1_2: # %if.then
|
||||
; MIPS64-NEXT: daddiu $sp, $sp, -16
|
||||
; MIPS64-NEXT: .cfi_def_cfa_offset 16
|
||||
; MIPS64-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill
|
||||
; MIPS64-NEXT: .cfi_offset 31, -8
|
||||
; MIPS64-NEXT: jal foo1
|
||||
; MIPS64-NEXT: nop
|
||||
; MIPS64-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload
|
||||
; MIPS64-NEXT: jr $ra
|
||||
; MIPS64-NEXT: daddiu $sp, $sp, 16
|
||||
;
|
||||
; MM-LABEL: test_bgez:
|
||||
; MM: # %bb.0: # %entry
|
||||
; MM-NEXT: bgez $4, $BB1_2
|
||||
; MM-NEXT: nop
|
||||
; MM-NEXT: # %bb.1: # %entry
|
||||
; MM-NEXT: j $BB1_3
|
||||
; MM-NEXT: nop
|
||||
; MM-NEXT: $BB1_2: # %if.end
|
||||
; MM-NEXT: jrc $ra
|
||||
; MM-NEXT: $BB1_3: # %if.then
|
||||
; MM-NEXT: addiu $sp, $sp, -24
|
||||
; MM-NEXT: .cfi_def_cfa_offset 24
|
||||
; MM-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
|
||||
; MM-NEXT: .cfi_offset 31, -4
|
||||
; MM-NEXT: jal foo1
|
||||
; MM-NEXT: nop
|
||||
; MM-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
|
||||
; MM-NEXT: jr $ra
|
||||
; MM-NEXT: addiu $sp, $sp, 24
|
||||
entry:
|
||||
%cmp = icmp slt i32 %a, 0
|
||||
br i1 %cmp, label %if.then, label %if.end
|
||||
|
Loading…
Reference in New Issue
Block a user