104 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS323--- |4 5 define i32 @Unconditional_branch(i32 %a, i32 %b) {6 entry:7 br label %block8 9 end: ; preds = %block10 ret i32 %a11 12 block: ; preds = %entry13 br label %end14 }15 16 define i32 @Conditional_branch(i1 %cond, i32 %a, i32 %b) {17 br i1 %cond, label %if.then, label %if.else18 19 if.then: ; preds = %020 ret i32 %a21 22 if.else: ; preds = %023 ret i32 %b24 }25 26...27---28name: Unconditional_branch29alignment: 430legalized: true31tracksRegLiveness: true32body: |33 ; MIPS32-LABEL: name: Unconditional_branch34 ; MIPS32: bb.0.entry:35 ; MIPS32: successors: %bb.2(0x80000000)36 ; MIPS32: liveins: $a0, $a137 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a038 ; MIPS32: G_BR %bb.239 ; MIPS32: bb.1.end:40 ; MIPS32: $v0 = COPY [[COPY]](s32)41 ; MIPS32: RetRA implicit $v042 ; MIPS32: bb.2.block:43 ; MIPS32: successors: %bb.1(0x80000000)44 ; MIPS32: G_BR %bb.145 bb.1.entry:46 liveins: $a0, $a147 48 %0:_(s32) = COPY $a049 G_BR %bb.350 51 bb.2.end:52 $v0 = COPY %0(s32)53 RetRA implicit $v054 55 bb.3.block:56 G_BR %bb.257 58...59---60name: Conditional_branch61alignment: 462legalized: true63tracksRegLiveness: true64body: |65 ; MIPS32-LABEL: name: Conditional_branch66 ; MIPS32: bb.0 (%ir-block.0):67 ; MIPS32: successors: %bb.1(0x40000000), %bb.2(0x40000000)68 ; MIPS32: liveins: $a0, $a1, $a269 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a070 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a171 ; MIPS32: [[COPY2:%[0-9]+]]:gprb(s32) = COPY $a272 ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 173 ; 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.176 ; MIPS32: G_BR %bb.277 ; MIPS32: bb.1.if.then:78 ; MIPS32: $v0 = COPY [[COPY1]](s32)79 ; MIPS32: RetRA implicit $v080 ; MIPS32: bb.2.if.else:81 ; MIPS32: $v0 = COPY [[COPY2]](s32)82 ; MIPS32: RetRA implicit $v083 bb.1 (%ir-block.0):84 liveins: $a0, $a1, $a285 86 %3:_(s32) = COPY $a087 %1:_(s32) = COPY $a188 %2:_(s32) = COPY $a289 %5:_(s32) = G_CONSTANT i32 190 %6:_(s32) = COPY %3(s32)91 %4:_(s32) = G_AND %6, %592 G_BRCOND %4(s32), %bb.293 G_BR %bb.394 95 bb.2.if.then:96 $v0 = COPY %1(s32)97 RetRA implicit $v098 99 bb.3.if.else:100 $v0 = COPY %2(s32)101 RetRA implicit $v0102 103...104