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 -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 @float_align1 = common global float 0.000000e+00, align 1
6 @float_align4 = common global float 0.000000e+00, align 4
7 @i32_align8 = common global i32 0, align 8
9 define float @load_float_align1() {
11 %0 = load float, ptr @float_align1, align 1
15 define float @load_float_align4() {
17 %0 = load float, ptr @float_align4, align 4
21 define i32 @load_i32_align8() {
23 %0 = load i32, ptr @i32_align8, align 8
29 name: load_float_align1
33 tracksRegLiveness: true
36 ; MIPS32-LABEL: name: load_float_align1
37 ; MIPS32: [[LUi:%[0-9]+]]:gpr32 = LUi target-flags(mips-abs-hi) @float_align1
38 ; MIPS32: [[ADDiu:%[0-9]+]]:gpr32 = ADDiu [[LUi]], target-flags(mips-abs-lo) @float_align1
39 ; MIPS32: [[DEF:%[0-9]+]]:gpr32 = IMPLICIT_DEF
40 ; MIPS32: [[LWL:%[0-9]+]]:gpr32 = LWL [[ADDiu]], 3, [[DEF]] :: (dereferenceable load (s32) from @float_align1, align 1)
41 ; MIPS32: [[LWR:%[0-9]+]]:gpr32 = LWR [[ADDiu]], 0, [[LWL]] :: (dereferenceable load (s32) from @float_align1, align 1)
42 ; MIPS32: $f0 = COPY [[LWR]]
43 ; MIPS32: RetRA implicit $f0
44 %1:gprb(p0) = G_GLOBAL_VALUE @float_align1
45 %0:gprb(s32) = G_LOAD %1(p0) :: (dereferenceable load (s32) from @float_align1, align 1)
51 name: load_float_align4
55 tracksRegLiveness: true
58 ; MIPS32-LABEL: name: load_float_align4
59 ; MIPS32: [[LUi:%[0-9]+]]:gpr32 = LUi target-flags(mips-abs-hi) @float_align4
60 ; MIPS32: [[ADDiu:%[0-9]+]]:gpr32 = ADDiu [[LUi]], target-flags(mips-abs-lo) @float_align4
61 ; MIPS32: [[LWC1_:%[0-9]+]]:fgr32 = LWC1 [[ADDiu]], 0 :: (dereferenceable load (s32) from @float_align4)
62 ; MIPS32: $f0 = COPY [[LWC1_]]
63 ; MIPS32: RetRA implicit $f0
64 %1:gprb(p0) = G_GLOBAL_VALUE @float_align4
65 %0:fprb(s32) = G_LOAD %1(p0) :: (dereferenceable load (s32) from @float_align4)
75 tracksRegLiveness: true
78 ; MIPS32-LABEL: name: load_i32_align8
79 ; MIPS32: [[LUi:%[0-9]+]]:gpr32 = LUi target-flags(mips-abs-hi) @i32_align8
80 ; MIPS32: [[ADDiu:%[0-9]+]]:gpr32 = ADDiu [[LUi]], target-flags(mips-abs-lo) @i32_align8
81 ; MIPS32: [[LW:%[0-9]+]]:gpr32 = LW [[ADDiu]], 0 :: (dereferenceable load (s32) from @i32_align8, align 8)
82 ; MIPS32: $v0 = COPY [[LW]]
83 ; MIPS32: RetRA implicit $v0
84 %1:gprb(p0) = G_GLOBAL_VALUE @i32_align8
85 %0:gprb(s32) = G_LOAD %1(p0) :: (dereferenceable load (s32) from @i32_align8, align 8)