1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 define void @load1_s8_to_load1_s32(i8* %px) {entry: ret void}
6 define void @load2_s16_to_load2_s32(i16* %px) {entry: ret void}
7 define void @load_store_i1(i1* %px, i1* %py) {entry: ret void}
8 define void @load_store_i8(i8* %px, i8* %py) {entry: ret void}
9 define void @load_store_i16(i16* %px, i16* %py) {entry: ret void}
10 define void @load_store_i32(i32* %px, i32* %py) {entry: ret void}
14 name: load1_s8_to_load1_s32
16 tracksRegLiveness: true
21 ; MIPS32-LABEL: name: load1_s8_to_load1_s32
22 ; MIPS32: liveins: $a0
23 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
24 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load 1 from %ir.px)
25 ; MIPS32: $v0 = COPY [[LOAD]](s32)
26 ; MIPS32: RetRA implicit $v0
28 %2:_(s32) = G_LOAD %0(p0) :: (load 1 from %ir.px)
34 name: load2_s16_to_load2_s32
36 tracksRegLiveness: true
41 ; MIPS32-LABEL: name: load2_s16_to_load2_s32
42 ; MIPS32: liveins: $a0
43 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
44 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load 2 from %ir.px)
45 ; MIPS32: $v0 = COPY [[LOAD]](s32)
46 ; MIPS32: RetRA implicit $v0
48 %2:_(s32) = G_LOAD %0(p0) :: (load 2 from %ir.px)
56 tracksRegLiveness: true
61 ; MIPS32-LABEL: name: load_store_i1
62 ; MIPS32: liveins: $a0, $a1
63 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
64 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1
65 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load 1 from %ir.py)
66 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
67 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
68 ; MIPS32: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
69 ; MIPS32: G_STORE [[AND]](s32), [[COPY]](p0) :: (store 1 into %ir.px)
73 %2:_(s1) = G_LOAD %1(p0) :: (load 1 from %ir.py)
74 G_STORE %2(s1), %0(p0) :: (store 1 into %ir.px)
81 tracksRegLiveness: true
86 ; MIPS32-LABEL: name: load_store_i8
87 ; MIPS32: liveins: $a0, $a1
88 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
89 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1
90 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load 1 from %ir.py)
91 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
92 ; MIPS32: G_STORE [[COPY2]](s32), [[COPY]](p0) :: (store 1 into %ir.px)
96 %2:_(s8) = G_LOAD %1(p0) :: (load 1 from %ir.py)
97 G_STORE %2(s8), %0(p0) :: (store 1 into %ir.px)
104 tracksRegLiveness: true
109 ; MIPS32-LABEL: name: load_store_i16
110 ; MIPS32: liveins: $a0, $a1
111 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
112 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1
113 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load 2 from %ir.py)
114 ; MIPS32: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LOAD]](s32)
115 ; MIPS32: G_STORE [[COPY2]](s32), [[COPY]](p0) :: (store 2 into %ir.px)
119 %2:_(s16) = G_LOAD %1(p0) :: (load 2 from %ir.py)
120 G_STORE %2(s16), %0(p0) :: (store 2 into %ir.px)
127 tracksRegLiveness: true
132 ; MIPS32-LABEL: name: load_store_i32
133 ; MIPS32: liveins: $a0, $a1
134 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
135 ; MIPS32: [[COPY1:%[0-9]+]]:_(p0) = COPY $a1
136 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY1]](p0) :: (load 4 from %ir.py)
137 ; MIPS32: G_STORE [[LOAD]](s32), [[COPY]](p0) :: (store 4 into %ir.px)
141 %2:_(s32) = G_LOAD %1(p0) :: (load 4 from %ir.py)
142 G_STORE %2(s32), %0(p0) :: (store 4 into %ir.px)