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: sw $5, 0($sp) # 4-byte Folded Spill
34 ; MIPS32-NEXT: sw $6, 4($sp) # 4-byte Folded Spill
35 ; MIPS32-NEXT: andi $1, $4, 1
36 ; MIPS32-NEXT: bnez $1, $BB1_2
38 ; MIPS32-NEXT: # %bb.1:
39 ; MIPS32-NEXT: j $BB1_3
41 ; MIPS32-NEXT: $BB1_2: # %if.then
42 ; MIPS32-NEXT: lw $2, 0($sp) # 4-byte Folded Reload
43 ; MIPS32-NEXT: addiu $sp, $sp, 8
46 ; MIPS32-NEXT: $BB1_3: # %if.else
47 ; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
48 ; MIPS32-NEXT: addiu $sp, $sp, 8
51 br i1 %cond, label %if.then, label %if.else