1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -mcpu=mips32r6 -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32R6
5 @float_align1 = common global float 0.000000e+00, align 1
6 @float_align8 = common global float 0.000000e+00, align 8
7 @i32_align2 = common global i32 0, align 2
9 define void @store_float_align1(float %a) #0 {
11 store float %a, ptr @float_align1, align 1
15 define void @store_float_align8(float %a) #0 {
17 store float %a, ptr @float_align8, align 8
21 define void @store_i32_align2(i32 signext %a) #0 {
23 store i32 %a, ptr @i32_align2, align 2
29 name: store_float_align1
33 tracksRegLiveness: true
38 ; MIPS32R6-LABEL: name: store_float_align1
39 ; MIPS32R6: liveins: $f12
40 ; MIPS32R6: [[COPY:%[0-9]+]]:fgr32 = COPY $f12
41 ; MIPS32R6: [[LUi:%[0-9]+]]:gpr32 = LUi target-flags(mips-abs-hi) @float_align1
42 ; MIPS32R6: [[ADDiu:%[0-9]+]]:gpr32 = ADDiu [[LUi]], target-flags(mips-abs-lo) @float_align1
43 ; MIPS32R6: SWC1 [[COPY]], [[ADDiu]], 0 :: (store (s32) into @float_align1, align 1)
45 %0:fprb(s32) = COPY $f12
46 %1:gprb(p0) = G_GLOBAL_VALUE @float_align1
47 G_STORE %0(s32), %1(p0) :: (store (s32) into @float_align1, align 1)
52 name: store_float_align8
56 tracksRegLiveness: true
61 ; MIPS32R6-LABEL: name: store_float_align8
62 ; MIPS32R6: liveins: $f12
63 ; MIPS32R6: [[COPY:%[0-9]+]]:fgr32 = COPY $f12
64 ; MIPS32R6: [[LUi:%[0-9]+]]:gpr32 = LUi target-flags(mips-abs-hi) @float_align8
65 ; MIPS32R6: [[ADDiu:%[0-9]+]]:gpr32 = ADDiu [[LUi]], target-flags(mips-abs-lo) @float_align8
66 ; MIPS32R6: SWC1 [[COPY]], [[ADDiu]], 0 :: (store (s32) into @float_align8, align 8)
68 %0:fprb(s32) = COPY $f12
69 %1:gprb(p0) = G_GLOBAL_VALUE @float_align8
70 G_STORE %0(s32), %1(p0) :: (store (s32) into @float_align8, align 8)
75 name: store_i32_align2
79 tracksRegLiveness: true
84 ; MIPS32R6-LABEL: name: store_i32_align2
85 ; MIPS32R6: liveins: $a0
86 ; MIPS32R6: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
87 ; MIPS32R6: [[LUi:%[0-9]+]]:gpr32 = LUi target-flags(mips-abs-hi) @i32_align2
88 ; MIPS32R6: [[ADDiu:%[0-9]+]]:gpr32 = ADDiu [[LUi]], target-flags(mips-abs-lo) @i32_align2
89 ; MIPS32R6: SW [[COPY]], [[ADDiu]], 0 :: (store (s32) into @i32_align2, align 2)
91 %0:gprb(s32) = COPY $a0
92 %1:gprb(p0) = G_GLOBAL_VALUE @i32_align2
93 G_STORE %0(s32), %1(p0) :: (store (s32) into @i32_align2, align 2)