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 @load_i32(i32* %ptr) {entry: ret void}
6 define void @load_i64(i64* %ptr) {entry: ret void}
7 define void @load_float(float* %ptr) {entry: ret void}
8 define void @load_double(double* %ptr) {entry: ret void}
14 tracksRegLiveness: true
19 ; MIPS32-LABEL: name: load_i32
20 ; MIPS32: liveins: $a0
21 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
22 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load 4 from %ir.ptr)
23 ; MIPS32: $v0 = COPY [[LOAD]](s32)
24 ; MIPS32: RetRA implicit $v0
26 %1:_(s32) = G_LOAD %0(p0) :: (load 4 from %ir.ptr)
34 tracksRegLiveness: true
39 ; MIPS32-LABEL: name: load_i64
40 ; MIPS32: liveins: $a0
41 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
42 ; MIPS32: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p0) :: (load 8 from %ir.ptr)
43 ; MIPS32: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[LOAD]](s64)
44 ; MIPS32: $v0 = COPY [[UV]](s32)
45 ; MIPS32: $v1 = COPY [[UV1]](s32)
46 ; MIPS32: RetRA implicit $v0, implicit $v1
48 %1:_(s64) = G_LOAD %0(p0) :: (load 8 from %ir.ptr)
49 %2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %1(s64)
52 RetRA implicit $v0, implicit $v1
58 tracksRegLiveness: true
63 ; MIPS32-LABEL: name: load_float
64 ; MIPS32: liveins: $a0
65 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
66 ; MIPS32: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load 4 from %ir.ptr)
67 ; MIPS32: $f0 = COPY [[LOAD]](s32)
68 ; MIPS32: RetRA implicit $f0
70 %1:_(s32) = G_LOAD %0(p0) :: (load 4 from %ir.ptr)
78 tracksRegLiveness: true
83 ; MIPS32-LABEL: name: load_double
84 ; MIPS32: liveins: $a0
85 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
86 ; MIPS32: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p0) :: (load 8 from %ir.ptr)
87 ; MIPS32: $d0 = COPY [[LOAD]](s64)
88 ; MIPS32: RetRA implicit $d0
90 %1:_(s64) = G_LOAD %0(p0) :: (load 8 from %ir.ptr)