1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32
3 define i32 @Unconditional_branch(i32 %a, i32 %b) {
4 ; MIPS32-LABEL: Unconditional_branch:
5 ; MIPS32: # %bb.0: # %entry
6 ; MIPS32-NEXT: addiu $sp, $sp, -8
7 ; MIPS32-NEXT: .cfi_def_cfa_offset 8
8 ; MIPS32-NEXT: sw $4, 4($sp) # 4-byte Folded Spill
9 ; MIPS32-NEXT: j $BB0_2
11 ; MIPS32-NEXT: $BB0_1: # %end
12 ; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
13 ; MIPS32-NEXT: addiu $sp, $sp, 8
16 ; MIPS32-NEXT: $BB0_2: # %block
17 ; MIPS32-NEXT: j $BB0_1
28 define i32 @Conditional_branch(i1 %cond, i32 %a, i32 %b) {
29 ; MIPS32-LABEL: Conditional_branch:
31 ; MIPS32-NEXT: addiu $sp, $sp, -8
32 ; MIPS32-NEXT: .cfi_def_cfa_offset 8
33 ; MIPS32-NEXT: ori $1, $zero, 1
34 ; MIPS32-NEXT: and $1, $4, $1
35 ; MIPS32-NEXT: sw $5, 4($sp) # 4-byte Folded Spill
36 ; MIPS32-NEXT: sw $6, 0($sp) # 4-byte Folded Spill
37 ; MIPS32-NEXT: bnez $1, $BB1_2
39 ; MIPS32-NEXT: # %bb.1:
40 ; MIPS32-NEXT: j $BB1_3
42 ; MIPS32-NEXT: $BB1_2: # %if.then
43 ; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
44 ; MIPS32-NEXT: addiu $sp, $sp, 8
47 ; MIPS32-NEXT: $BB1_3: # %if.else
48 ; MIPS32-NEXT: lw $2, 0($sp) # 4-byte Folded Reload
49 ; MIPS32-NEXT: addiu $sp, $sp, 8
52 br i1 %cond, label %if.then, label %if.else