brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.0 KiB · 20f18fe Raw
266 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 void @select_i32(i32, i32) {entry: ret void}6  define void @select_ptr(i32, i32) {entry: ret void}7  define void @select_i64() {entry: ret void}8  define void @select_ambiguous_i64_in_fpr(ptr %i64_ptr_a, ptr %i64_ptr_b, ptr %i64_ptr_c) {entry: ret void}9  define void @select_float() {entry: ret void}10  define void @select_ambiguous_float_in_gpr(ptr %f32_ptr_a, ptr %f32_ptr_b, ptr %f32_ptr_c) {entry: ret void}11  define void @select_double() {entry: ret void}12 13...14---15name:            select_i3216alignment:       417legalized:       true18tracksRegLiveness: true19body:             |20  bb.1.entry:21    liveins: $a0, $a1, $a222 23    ; MIPS32-LABEL: name: select_i3224    ; MIPS32: liveins: $a0, $a1, $a225    ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a026    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a127    ; MIPS32: [[COPY2:%[0-9]+]]:gprb(s32) = COPY $a228    ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 129    ; MIPS32: [[COPY3:%[0-9]+]]:gprb(s32) = COPY [[COPY]](s32)30    ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY3]], [[C]]31    ; MIPS32: [[SELECT:%[0-9]+]]:gprb(s32) = G_SELECT [[AND]](s32), [[COPY1]], [[COPY2]]32    ; MIPS32: $v0 = COPY [[SELECT]](s32)33    ; MIPS32: RetRA implicit $v034    %3:_(s32) = COPY $a035    %1:_(s32) = COPY $a136    %2:_(s32) = COPY $a237    %6:_(s32) = G_CONSTANT i32 138    %7:_(s32) = COPY %3(s32)39    %5:_(s32) = G_AND %7, %640    %4:_(s32) = G_SELECT %5(s32), %1, %241    $v0 = COPY %4(s32)42    RetRA implicit $v043 44...45---46name:            select_ptr47alignment:       448legalized:       true49tracksRegLiveness: true50body:             |51  bb.1.entry:52    liveins: $a0, $a1, $a253 54    ; MIPS32-LABEL: name: select_ptr55    ; MIPS32: liveins: $a0, $a1, $a256    ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a057    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a158    ; MIPS32: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a259    ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 160    ; MIPS32: [[COPY3:%[0-9]+]]:gprb(s32) = COPY [[COPY]](s32)61    ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY3]], [[C]]62    ; MIPS32: [[SELECT:%[0-9]+]]:gprb(p0) = G_SELECT [[AND]](s32), [[COPY1]], [[COPY2]]63    ; MIPS32: $v0 = COPY [[SELECT]](p0)64    ; MIPS32: RetRA implicit $v065    %3:_(s32) = COPY $a066    %1:_(p0) = COPY $a167    %2:_(p0) = COPY $a268    %6:_(s32) = G_CONSTANT i32 169    %7:_(s32) = COPY %3(s32)70    %5:_(s32) = G_AND %7, %671    %4:_(p0) = G_SELECT %5(s32), %1, %272    $v0 = COPY %4(p0)73    RetRA implicit $v074 75...76---77name:            select_i6478alignment:       479legalized:       true80tracksRegLiveness: true81fixedStack:82  - { id: 0, offset: 20, size: 4, alignment: 4, isImmutable: true }83  - { id: 1, offset: 16, size: 4, alignment: 8, isImmutable: true }84body:             |85  bb.1.entry:86    liveins: $a0, $a2, $a387 88    ; MIPS32-LABEL: name: select_i6489    ; MIPS32: liveins: $a0, $a2, $a390    ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a091    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a292    ; MIPS32: [[COPY2:%[0-9]+]]:gprb(s32) = COPY $a393    ; MIPS32: [[FRAME_INDEX:%[0-9]+]]:gprb(p0) = G_FRAME_INDEX %fixed-stack.094    ; MIPS32: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)95    ; MIPS32: [[FRAME_INDEX1:%[0-9]+]]:gprb(p0) = G_FRAME_INDEX %fixed-stack.196    ; MIPS32: [[LOAD1:%[0-9]+]]:gprb(s32) = G_LOAD [[FRAME_INDEX1]](p0) :: (load (s32) from %fixed-stack.1)97    ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 198    ; MIPS32: [[COPY3:%[0-9]+]]:gprb(s32) = COPY [[COPY]](s32)99    ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY3]], [[C]]100    ; MIPS32: [[SELECT:%[0-9]+]]:gprb(s32) = G_SELECT [[AND]](s32), [[COPY1]], [[LOAD]]101    ; MIPS32: [[SELECT1:%[0-9]+]]:gprb(s32) = G_SELECT [[AND]](s32), [[COPY2]], [[LOAD1]]102    ; MIPS32: $v0 = COPY [[SELECT]](s32)103    ; MIPS32: $v1 = COPY [[SELECT1]](s32)104    ; MIPS32: RetRA implicit $v0, implicit $v1105    %3:_(s32) = COPY $a0106    %4:_(s32) = COPY $a2107    %5:_(s32) = COPY $a3108    %1:_(s64) = G_MERGE_VALUES %4(s32), %5(s32)109    %8:_(p0) = G_FRAME_INDEX %fixed-stack.1110    %6:_(s32) = G_LOAD %8(p0) :: (load (s32) from %fixed-stack.1, align 8)111    %9:_(p0) = G_FRAME_INDEX %fixed-stack.0112    %7:_(s32) = G_LOAD %9(p0) :: (load (s32) from %fixed-stack.0)113    %2:_(s64) = G_MERGE_VALUES %6(s32), %7(s32)114    %14:_(s32) = G_CONSTANT i32 1115    %15:_(s32) = COPY %3(s32)116    %13:_(s32) = G_AND %15, %14117    %10:_(s64) = G_SELECT %13(s32), %1, %2118    %11:_(s32), %12:_(s32) = G_UNMERGE_VALUES %10(s64)119    $v0 = COPY %11(s32)120    $v1 = COPY %12(s32)121    RetRA implicit $v0, implicit $v1122 123...124---125name:            select_ambiguous_i64_in_fpr126alignment:       4127legalized:       true128tracksRegLiveness: true129body:             |130  bb.1.entry:131    liveins: $a0, $a1, $a2, $a3132 133    ; MIPS32-LABEL: name: select_ambiguous_i64_in_fpr134    ; MIPS32: liveins: $a0, $a1, $a2, $a3135    ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0136    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1137    ; MIPS32: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2138    ; MIPS32: [[COPY3:%[0-9]+]]:gprb(p0) = COPY $a3139    ; MIPS32: [[LOAD:%[0-9]+]]:fprb(s64) = G_LOAD [[COPY1]](p0) :: (load (s64) from %ir.i64_ptr_a)140    ; MIPS32: [[LOAD1:%[0-9]+]]:fprb(s64) = G_LOAD [[COPY2]](p0) :: (load (s64) from %ir.i64_ptr_b)141    ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1142    ; MIPS32: [[COPY4:%[0-9]+]]:gprb(s32) = COPY [[COPY]](s32)143    ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY4]], [[C]]144    ; MIPS32: [[SELECT:%[0-9]+]]:fprb(s64) = G_SELECT [[AND]](s32), [[LOAD]], [[LOAD1]]145    ; MIPS32: G_STORE [[SELECT]](s64), [[COPY3]](p0) :: (store (s64) into %ir.i64_ptr_c)146    ; MIPS32: RetRA147    %4:_(s32) = COPY $a0148    %1:_(p0) = COPY $a1149    %2:_(p0) = COPY $a2150    %3:_(p0) = COPY $a3151    %5:_(s64) = G_LOAD %1(p0) :: (load (s64) from %ir.i64_ptr_a)152    %6:_(s64) = G_LOAD %2(p0) :: (load (s64) from %ir.i64_ptr_b)153    %9:_(s32) = G_CONSTANT i32 1154    %10:_(s32) = COPY %4(s32)155    %8:_(s32) = G_AND %10, %9156    %7:_(s64) = G_SELECT %8(s32), %5, %6157    G_STORE %7(s64), %3(p0) :: (store (s64) into %ir.i64_ptr_c)158    RetRA159 160...161---162name:            select_float163alignment:       4164legalized:       true165tracksRegLiveness: true166body:             |167  bb.1.entry:168    liveins: $a0, $a1, $a2169 170    ; MIPS32-LABEL: name: select_float171    ; MIPS32: liveins: $a0, $a1, $a2172    ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0173    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1174    ; MIPS32: [[COPY2:%[0-9]+]]:gprb(s32) = COPY $a2175    ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1176    ; MIPS32: [[COPY3:%[0-9]+]]:gprb(s32) = COPY [[COPY]](s32)177    ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY3]], [[C]]178    ; MIPS32: [[COPY4:%[0-9]+]]:fprb(s32) = COPY [[COPY1]](s32)179    ; MIPS32: [[COPY5:%[0-9]+]]:fprb(s32) = COPY [[COPY2]](s32)180    ; MIPS32: [[SELECT:%[0-9]+]]:fprb(s32) = G_SELECT [[AND]](s32), [[COPY4]], [[COPY5]]181    ; MIPS32: $f0 = COPY [[SELECT]](s32)182    ; MIPS32: RetRA implicit $f0183    %3:_(s32) = COPY $a0184    %1:_(s32) = COPY $a1185    %2:_(s32) = COPY $a2186    %6:_(s32) = G_CONSTANT i32 1187    %7:_(s32) = COPY %3(s32)188    %5:_(s32) = G_AND %7, %6189    %4:_(s32) = G_SELECT %5(s32), %1, %2190    $f0 = COPY %4(s32)191    RetRA implicit $f0192 193...194---195name:            select_ambiguous_float_in_gpr196alignment:       4197legalized:       true198tracksRegLiveness: true199body:             |200  bb.1.entry:201    liveins: $a0, $a1, $a2, $a3202 203    ; MIPS32-LABEL: name: select_ambiguous_float_in_gpr204    ; MIPS32: liveins: $a0, $a1, $a2, $a3205    ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0206    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1207    ; MIPS32: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2208    ; MIPS32: [[COPY3:%[0-9]+]]:gprb(p0) = COPY $a3209    ; MIPS32: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[COPY1]](p0) :: (load (s32) from %ir.f32_ptr_a)210    ; MIPS32: [[LOAD1:%[0-9]+]]:gprb(s32) = G_LOAD [[COPY2]](p0) :: (load (s32) from %ir.f32_ptr_b)211    ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1212    ; MIPS32: [[COPY4:%[0-9]+]]:gprb(s32) = COPY [[COPY]](s32)213    ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY4]], [[C]]214    ; MIPS32: [[SELECT:%[0-9]+]]:gprb(s32) = G_SELECT [[AND]](s32), [[LOAD]], [[LOAD1]]215    ; MIPS32: G_STORE [[SELECT]](s32), [[COPY3]](p0) :: (store (s32) into %ir.f32_ptr_c)216    ; MIPS32: RetRA217    %4:_(s32) = COPY $a0218    %1:_(p0) = COPY $a1219    %2:_(p0) = COPY $a2220    %3:_(p0) = COPY $a3221    %5:_(s32) = G_LOAD %1(p0) :: (load (s32) from %ir.f32_ptr_a)222    %6:_(s32) = G_LOAD %2(p0) :: (load (s32) from %ir.f32_ptr_b)223    %9:_(s32) = G_CONSTANT i32 1224    %10:_(s32) = COPY %4(s32)225    %8:_(s32) = G_AND %10, %9226    %7:_(s32) = G_SELECT %8(s32), %5, %6227    G_STORE %7(s32), %3(p0) :: (store (s32) into %ir.f32_ptr_c)228    RetRA229 230...231---232name:            select_double233alignment:       4234legalized:       true235tracksRegLiveness: true236fixedStack:237  - { id: 0, offset: 16, size: 4, alignment: 8, isImmutable: true }238body:             |239  bb.1.entry:240    liveins: $d6, $d7241 242    ; MIPS32-LABEL: name: select_double243    ; MIPS32: liveins: $d6, $d7244    ; MIPS32: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6245    ; MIPS32: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $d7246    ; MIPS32: [[FRAME_INDEX:%[0-9]+]]:gprb(p0) = G_FRAME_INDEX %fixed-stack.0247    ; MIPS32: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)248    ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 1249    ; MIPS32: [[COPY2:%[0-9]+]]:gprb(s32) = COPY [[LOAD]](s32)250    ; MIPS32: [[AND:%[0-9]+]]:gprb(s32) = G_AND [[COPY2]], [[C]]251    ; MIPS32: [[SELECT:%[0-9]+]]:fprb(s64) = G_SELECT [[AND]](s32), [[COPY]], [[COPY1]]252    ; MIPS32: $d0 = COPY [[SELECT]](s64)253    ; MIPS32: RetRA implicit $d0254    %0:_(s64) = COPY $d6255    %1:_(s64) = COPY $d7256    %4:_(p0) = G_FRAME_INDEX %fixed-stack.0257    %3:_(s32) = G_LOAD %4(p0) :: (load (s32) from %fixed-stack.0, align 8)258    %7:_(s32) = G_CONSTANT i32 1259    %8:_(s32) = COPY %3(s32)260    %6:_(s32) = G_AND %8, %7261    %5:_(s64) = G_SELECT %6(s32), %0, %1262    $d0 = COPY %5(s64)263    RetRA implicit $d0264 265...266