1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 define i32 @Unconditional_branch(i32 %a, i32 %b) {
12 block: ; preds = %entry
16 define i32 @Conditional_branch(i1 %cond, i32 %a, i32 %b) {
17 br i1 %cond, label %if.then, label %if.else
28 name: Unconditional_branch
31 tracksRegLiveness: true
33 ; MIPS32-LABEL: name: Unconditional_branch
35 ; MIPS32: successors: %bb.2(0x80000000)
36 ; MIPS32: liveins: $a0, $a1
37 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
40 ; MIPS32: $v0 = COPY [[COPY]](s32)
41 ; MIPS32: RetRA implicit $v0
43 ; MIPS32: successors: %bb.1(0x80000000)
60 name: Conditional_branch
63 tracksRegLiveness: true
65 ; MIPS32-LABEL: name: Conditional_branch
66 ; MIPS32: bb.0 (%ir-block.0):
67 ; MIPS32: successors: %bb.1(0x40000000), %bb.2(0x40000000)
68 ; MIPS32: liveins: $a0, $a1, $a2
69 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
70 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1
71 ; MIPS32: [[COPY2:%[0-9]+]]:gprb(s32) = COPY $a2
72 ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1
73 ; MIPS32: [[COPY3:%[0-9]+]]:gprb(s32) = COPY [[COPY]](s32)
74 ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY3]], [[C]]
75 ; MIPS32: G_BRCOND [[AND]](s32), %bb.1
77 ; MIPS32: bb.1.if.then:
78 ; MIPS32: $v0 = COPY [[COPY1]](s32)
79 ; MIPS32: RetRA implicit $v0
80 ; MIPS32: bb.2.if.else:
81 ; MIPS32: $v0 = COPY [[COPY2]](s32)
82 ; MIPS32: RetRA implicit $v0
84 liveins: $a0, $a1, $a2
89 %5:_(s32) = G_CONSTANT i32 1
90 %6:_(s32) = COPY %3(s32)
91 %4:_(s32) = G_AND %6, %5
92 G_BRCOND %4(s32), %bb.2