1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -riscv-enable-global-merge -verify-machineinstrs < %s \
4 ; RUN: llc -mtriple=riscv64 -riscv-enable-global-merge -verify-machineinstrs < %s \
7 @ig1 = internal global i32 0, align 4
8 @ig2 = internal global i32 0, align 4
10 @eg1 = dso_local global i32 0, align 4
11 @eg2 = dso_local global i32 0, align 4
13 ; TODO: It would be better for code size to alter the first store below by
14 ; first fully materialising .L_MergedGlobals in a1 and then storing to it with
17 define void @f1(i32 %a) nounwind {
20 ; CHECK-NEXT: lui a1, %hi(.L_MergedGlobals)
21 ; CHECK-NEXT: sw a0, %lo(.L_MergedGlobals)(a1)
22 ; CHECK-NEXT: addi a1, a1, %lo(.L_MergedGlobals)
23 ; CHECK-NEXT: sw a0, 4(a1)
24 ; CHECK-NEXT: sw a0, 8(a1)
25 ; CHECK-NEXT: sw a0, 12(a1)
27 store i32 %a, ptr @ig1, align 4
28 store i32 %a, ptr @ig2, align 4
29 store i32 %a, ptr @eg1, align 4
30 store i32 %a, ptr @eg2, align 4