brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 621f1c4 Raw
100 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -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:       430tracksRegLiveness: true31body:             |32  ; MIPS32-LABEL: name: Unconditional_branch33  ; MIPS32: bb.0.entry:34  ; MIPS32:   successors: %bb.2(0x80000000)35  ; MIPS32:   liveins: $a0, $a136  ; MIPS32:   [[COPY:%[0-9]+]]:_(s32) = COPY $a037  ; MIPS32:   G_BR %bb.238  ; MIPS32: bb.1.end:39  ; MIPS32:   $v0 = COPY [[COPY]](s32)40  ; MIPS32:   RetRA implicit $v041  ; MIPS32: bb.2.block:42  ; MIPS32:   successors: %bb.1(0x80000000)43  ; MIPS32:   G_BR %bb.144  bb.1.entry:45    liveins: $a0, $a146 47    %0:_(s32) = COPY $a048    G_BR %bb.349 50  bb.2.end:51    $v0 = COPY %0(s32)52    RetRA implicit $v053 54  bb.3.block:55    G_BR %bb.256 57...58---59name:            Conditional_branch60alignment:       461tracksRegLiveness: true62body:             |63  ; MIPS32-LABEL: name: Conditional_branch64  ; MIPS32: bb.0 (%ir-block.0):65  ; MIPS32:   successors: %bb.1(0x40000000), %bb.2(0x40000000)66  ; MIPS32:   liveins: $a0, $a1, $a267  ; MIPS32:   [[COPY:%[0-9]+]]:_(s32) = COPY $a068  ; MIPS32:   [[COPY1:%[0-9]+]]:_(s32) = COPY $a169  ; MIPS32:   [[COPY2:%[0-9]+]]:_(s32) = COPY $a270  ; MIPS32:   [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 171  ; MIPS32:   [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]72  ; MIPS32:   G_BRCOND [[AND]](s32), %bb.173  ; MIPS32:   G_BR %bb.274  ; MIPS32: bb.1.if.then:75  ; MIPS32:   $v0 = COPY [[COPY1]](s32)76  ; MIPS32:   RetRA implicit $v077  ; MIPS32: bb.2.if.else:78  ; MIPS32:   $v0 = COPY [[COPY2]](s32)79  ; MIPS32:   RetRA implicit $v080  bb.1 (%ir-block.0):81    liveins: $a0, $a1, $a282 83    %3:_(s32) = COPY $a084    %0:_(s1) = G_TRUNC %3(s32)85    %1:_(s32) = COPY $a186    %2:_(s32) = COPY $a287    G_BRCOND %0(s1), %bb.288    G_BR %bb.389 90  bb.2.if.then:91    $v0 = COPY %1(s32)92    RetRA implicit $v093 94  bb.3.if.else:95    $v0 = COPY %2(s32)96    RetRA implicit $v097 98...99 100