Skip to content

Commit d259fb1

Browse files
committed
Patch with updated test case, based on feedback.
1 parent ea3c20a commit d259fb1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

llvm/test/CodeGen/AMDGPU/swdev-504645.ll renamed to llvm/test/CodeGen/AMDGPU/swdev504645-global-fold.ll

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
; RUN: llc -mtriple=amdgcn -mcpu=gfx942 -verify-machineinstrs < %s | FileCheck %s
2+
; RUN: llc -mtriple=amdgcn -mcpu=gfx942 < %s | FileCheck %s
33

44
define void @test_load_zext() {
55
; CHECK-LABEL: test_load_zext:
@@ -13,8 +13,8 @@ define void @test_load_zext() {
1313
; CHECK-NEXT: s_add_i32 s32, s32, 16
1414
; CHECK-NEXT: v_writelane_b32 v40, s0, 2
1515
; CHECK-NEXT: s_getpc_b64 s[0:1]
16-
; CHECK-NEXT: s_add_u32 s0, s0, test_buffer_load_sgpr_plus_imm_offset_noflags@gotpcrel32@lo+4
17-
; CHECK-NEXT: s_addc_u32 s1, s1, test_buffer_load_sgpr_plus_imm_offset_noflags@gotpcrel32@hi+12
16+
; CHECK-NEXT: s_add_u32 s0, s0, has_spgr_args@gotpcrel32@lo+4
17+
; CHECK-NEXT: s_addc_u32 s1, s1, has_spgr_args@gotpcrel32@hi+12
1818
; CHECK-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x0
1919
; CHECK-NEXT: v_writelane_b32 v40, s30, 0
2020
; CHECK-NEXT: s_mov_b32 s0, DescriptorBuffer@abs32@lo
@@ -32,14 +32,13 @@ define void @test_load_zext() {
3232
; CHECK-NEXT: s_waitcnt vmcnt(0)
3333
; CHECK-NEXT: s_setpc_b64 s[30:31]
3434
.entry:
35-
%0 = call i32 @llvm.amdgcn.reloc.constant(metadata !0)
36-
call void @test_buffer_load_sgpr_plus_imm_offset_noflags(i32 %0)
35+
%reloc = call i32 @llvm.amdgcn.reloc.constant(metadata !0)
36+
call void @has_spgr_args(i32 %reloc)
3737
ret void
3838
}
3939

40-
declare void @test_buffer_load_sgpr_plus_imm_offset_noflags(i32 inreg)
40+
declare void @has_spgr_args(i32 inreg)
4141

42-
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
4342
declare i32 @llvm.amdgcn.reloc.constant(metadata) #0
4443

4544
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

0 commit comments

Comments
 (0)