155 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 @load_i32(ptr %ptr) {entry: ret void}6 define void @load_i64(ptr %ptr) {entry: ret void}7 define void @load_ambiguous_i64_in_fpr(ptr %i64_ptr_a, ptr %i64_ptr_b) {entry: ret void}8 define void @load_float(ptr %ptr) {entry: ret void}9 define void @load_ambiguous_float_in_gpr(ptr %float_ptr_a, ptr %float_ptr_b) {entry: ret void}10 define void @load_double(ptr %ptr) {entry: ret void}11 12...13---14name: load_i3215alignment: 416legalized: true17tracksRegLiveness: true18body: |19 bb.1.entry:20 liveins: $a021 22 ; MIPS32-LABEL: name: load_i3223 ; MIPS32: liveins: $a024 ; MIPS32-NEXT: {{ $}}25 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a026 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[COPY]](p0) :: (load (s32) from %ir.ptr)27 ; MIPS32-NEXT: $v0 = COPY [[LOAD]](s32)28 ; MIPS32-NEXT: RetRA implicit $v029 %0:_(p0) = COPY $a030 %1:_(s32) = G_LOAD %0(p0) :: (load (s32) from %ir.ptr)31 $v0 = COPY %1(s32)32 RetRA implicit $v033 34...35---36name: load_i6437alignment: 438legalized: true39tracksRegLiveness: true40body: |41 bb.1.entry:42 liveins: $a043 44 ; MIPS32-LABEL: name: load_i6445 ; MIPS32: liveins: $a046 ; MIPS32-NEXT: {{ $}}47 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a048 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[COPY]](p0) :: (load (s32) from %ir.ptr, align 8)49 ; MIPS32-NEXT: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 450 ; MIPS32-NEXT: [[PTR_ADD:%[0-9]+]]:gprb(p0) = nuw inbounds G_PTR_ADD [[COPY]], [[C]](s32)51 ; MIPS32-NEXT: [[LOAD1:%[0-9]+]]:gprb(s32) = G_LOAD [[PTR_ADD]](p0) :: (load (s32) from %ir.ptr + 4, basealign 8)52 ; MIPS32-NEXT: $v0 = COPY [[LOAD]](s32)53 ; MIPS32-NEXT: $v1 = COPY [[LOAD1]](s32)54 ; MIPS32-NEXT: RetRA implicit $v0, implicit $v155 %0:_(p0) = COPY $a056 %1:_(s64) = G_LOAD %0(p0) :: (load (s64) from %ir.ptr)57 %2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %1(s64)58 $v0 = COPY %2(s32)59 $v1 = COPY %3(s32)60 RetRA implicit $v0, implicit $v161 62...63---64name: load_ambiguous_i64_in_fpr65alignment: 466legalized: true67tracksRegLiveness: true68body: |69 bb.1.entry:70 liveins: $a0, $a171 72 ; MIPS32-LABEL: name: load_ambiguous_i64_in_fpr73 ; MIPS32: liveins: $a0, $a174 ; MIPS32-NEXT: {{ $}}75 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a076 ; MIPS32-NEXT: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a177 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:fprb(s64) = G_LOAD [[COPY]](p0) :: (load (s64) from %ir.i64_ptr_a)78 ; MIPS32-NEXT: G_STORE [[LOAD]](s64), [[COPY1]](p0) :: (store (s64) into %ir.i64_ptr_b)79 ; MIPS32-NEXT: RetRA80 %0:_(p0) = COPY $a081 %1:_(p0) = COPY $a182 %2:_(s64) = G_LOAD %0(p0) :: (load (s64) from %ir.i64_ptr_a)83 G_STORE %2(s64), %1(p0) :: (store (s64) into %ir.i64_ptr_b)84 RetRA85 86...87---88name: load_float89alignment: 490legalized: true91tracksRegLiveness: true92body: |93 bb.1.entry:94 liveins: $a095 96 ; MIPS32-LABEL: name: load_float97 ; MIPS32: liveins: $a098 ; MIPS32-NEXT: {{ $}}99 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0100 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:fprb(s32) = G_LOAD [[COPY]](p0) :: (load (s32) from %ir.ptr)101 ; MIPS32-NEXT: $f0 = COPY [[LOAD]](s32)102 ; MIPS32-NEXT: RetRA implicit $f0103 %0:_(p0) = COPY $a0104 %1:_(s32) = G_LOAD %0(p0) :: (load (s32) from %ir.ptr)105 $f0 = COPY %1(s32)106 RetRA implicit $f0107 108...109---110name: load_ambiguous_float_in_gpr111alignment: 4112legalized: true113tracksRegLiveness: true114body: |115 bb.1.entry:116 liveins: $a0, $a1117 118 ; MIPS32-LABEL: name: load_ambiguous_float_in_gpr119 ; MIPS32: liveins: $a0, $a1120 ; MIPS32-NEXT: {{ $}}121 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0122 ; MIPS32-NEXT: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1123 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[COPY]](p0) :: (load (s32) from %ir.float_ptr_a)124 ; MIPS32-NEXT: G_STORE [[LOAD]](s32), [[COPY1]](p0) :: (store (s32) into %ir.float_ptr_b)125 ; MIPS32-NEXT: RetRA126 %0:_(p0) = COPY $a0127 %1:_(p0) = COPY $a1128 %2:_(s32) = G_LOAD %0(p0) :: (load (s32) from %ir.float_ptr_a)129 G_STORE %2(s32), %1(p0) :: (store (s32) into %ir.float_ptr_b)130 RetRA131 132...133---134name: load_double135alignment: 4136legalized: true137tracksRegLiveness: true138body: |139 bb.1.entry:140 liveins: $a0141 142 ; MIPS32-LABEL: name: load_double143 ; MIPS32: liveins: $a0144 ; MIPS32-NEXT: {{ $}}145 ; MIPS32-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $a0146 ; MIPS32-NEXT: [[LOAD:%[0-9]+]]:fprb(s64) = G_LOAD [[COPY]](p0) :: (load (s64) from %ir.ptr)147 ; MIPS32-NEXT: $d0 = COPY [[LOAD]](s64)148 ; MIPS32-NEXT: RetRA implicit $d0149 %0:_(p0) = COPY $a0150 %1:_(s64) = G_LOAD %0(p0) :: (load (s64) from %ir.ptr)151 $d0 = COPY %1(s64)152 RetRA implicit $d0153 154...155