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 void @store_float_align1(float %a) {
12 store float %a, ptr @float_align1, align 1
16 define void @store_float_align4(float %a) {
18 store float %a, ptr @float_align4, align 4
22 define void @store_i32_align8(i32 signext %a) {
24 store i32 %a, ptr @i32_align8, align 8
30 name: store_float_align1
33 tracksRegLiveness: true
38 ; MIPS32-LABEL: name: store_float_align1
39 ; MIPS32: liveins: $f12
40 ; MIPS32: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
41 ; MIPS32: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @float_align1
42 ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY [[COPY]](s32)
43 ; MIPS32: G_STORE [[COPY1]](s32), [[GV]](p0) :: (store (s32) into @float_align1, align 1)
45 ; MIPS32R6-LABEL: name: store_float_align1
46 ; MIPS32R6: liveins: $f12
47 ; MIPS32R6: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
48 ; MIPS32R6: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @float_align1
49 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align1, align 1)
52 %1:_(p0) = G_GLOBAL_VALUE @float_align1
53 G_STORE %0(s32), %1(p0) :: (store (s32) into @float_align1, align 1)
58 name: store_float_align4
61 tracksRegLiveness: true
66 ; MIPS32-LABEL: name: store_float_align4
67 ; MIPS32: liveins: $f12
68 ; MIPS32: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
69 ; MIPS32: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @float_align4
70 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align4)
72 ; MIPS32R6-LABEL: name: store_float_align4
73 ; MIPS32R6: liveins: $f12
74 ; MIPS32R6: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
75 ; MIPS32R6: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @float_align4
76 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @float_align4)
79 %1:_(p0) = G_GLOBAL_VALUE @float_align4
80 G_STORE %0(s32), %1(p0) :: (store (s32) into @float_align4)
85 name: store_i32_align8
88 tracksRegLiveness: true
93 ; MIPS32-LABEL: name: store_i32_align8
94 ; MIPS32: liveins: $a0
95 ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
96 ; MIPS32: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @i32_align8
97 ; MIPS32: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align8, align 8)
99 ; MIPS32R6-LABEL: name: store_i32_align8
100 ; MIPS32R6: liveins: $a0
101 ; MIPS32R6: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
102 ; MIPS32R6: [[GV:%[0-9]+]]:gprb(p0) = G_GLOBAL_VALUE @i32_align8
103 ; MIPS32R6: G_STORE [[COPY]](s32), [[GV]](p0) :: (store (s32) into @i32_align8, align 8)
106 %1:_(p0) = G_GLOBAL_VALUE @i32_align8
107 G_STORE %0(s32), %1(p0) :: (store (s32) into @i32_align8, align 8)