1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
3 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -mcpu=mips32r6 -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32R6
6 @float_align1 = common global float 0.000000e+00, align 1
7 @float_align4 = common global float 0.000000e+00, align 4
8 @i32_align8 = common global i32 0, align 8
10 define float @load_float_align1() {
12 %0 = load float, ptr @float_align1, align 1
16 define float @load_float_align4() {
18 %0 = load float, ptr @float_align4, align 4
22 define i32 @load_i32_align8() {
24 %0 = load i32, ptr @i32_align8, align 8
30 name: load_float_align1
33 tracksRegLiveness: true
36 ; MIPS32-LABEL: name: load_float_align1
37 ; MIPS32: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @float_align1
38 ; MIPS32: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[GV]](p0) :: (dereferenceable load (s32) from @float_align1, align 1)
39 ; MIPS32: $f0 = COPY [[LOAD]](s32)
40 ; MIPS32: RetRA implicit $f0
41 ; MIPS32R6-LABEL: name: load_float_align1
42 ; MIPS32R6: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @float_align1
43 ; MIPS32R6: [[LOAD:%[0-9]+]]:fprb(s32) = G_LOAD [[GV]](p0) :: (dereferenceable load (s32) from @float_align1, align 1)
44 ; MIPS32R6: $f0 = COPY [[LOAD]](s32)
45 ; MIPS32R6: RetRA implicit $f0
46 %1:_(p0) = G_GLOBAL_VALUE @float_align1
47 %0:_(s32) = G_LOAD %1(p0) :: (dereferenceable load (s32) from @float_align1, align 1)
53 name: load_float_align4
56 tracksRegLiveness: true
59 ; MIPS32-LABEL: name: load_float_align4
60 ; MIPS32: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @float_align4
61 ; MIPS32: [[LOAD:%[0-9]+]]:fprb(s32) = G_LOAD [[GV]](p0) :: (dereferenceable load (s32) from @float_align4)
62 ; MIPS32: $f0 = COPY [[LOAD]](s32)
63 ; MIPS32: RetRA implicit $f0
64 ; MIPS32R6-LABEL: name: load_float_align4
65 ; MIPS32R6: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @float_align4
66 ; MIPS32R6: [[LOAD:%[0-9]+]]:fprb(s32) = G_LOAD [[GV]](p0) :: (dereferenceable load (s32) from @float_align4)
67 ; MIPS32R6: $f0 = COPY [[LOAD]](s32)
68 ; MIPS32R6: RetRA implicit $f0
69 %1:_(p0) = G_GLOBAL_VALUE @float_align4
70 %0:_(s32) = G_LOAD %1(p0) :: (dereferenceable load (s32) from @float_align4)
79 tracksRegLiveness: true
82 ; MIPS32-LABEL: name: load_i32_align8
83 ; MIPS32: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @i32_align8
84 ; MIPS32: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[GV]](p0) :: (dereferenceable load (s32) from @i32_align8, align 8)
85 ; MIPS32: $v0 = COPY [[LOAD]](s32)
86 ; MIPS32: RetRA implicit $v0
87 ; MIPS32R6-LABEL: name: load_i32_align8
88 ; MIPS32R6: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @i32_align8
89 ; MIPS32R6: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[GV]](p0) :: (dereferenceable load (s32) from @i32_align8, align 8)
90 ; MIPS32R6: $v0 = COPY [[LOAD]](s32)
91 ; MIPS32R6: RetRA implicit $v0
92 %1:_(p0) = G_GLOBAL_VALUE @i32_align8
93 %0:_(s32) = G_LOAD %1(p0) :: (dereferenceable load (s32) from @i32_align8, align 8)