Skip to content

Commit

Permalink
[FIX][AMDGPU] Fix test case failures that caused by reapply of llvm#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
shiltian committed Nov 9, 2024
1 parent d413335 commit c93e001
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
24 changes: 12 additions & 12 deletions llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3039,7 +3039,7 @@ define amdgpu_kernel void @dyn_extract_v5f64_s_s(ptr addrspace(1) %out, i32 %sel
; GPRIDX-NEXT: enable_exception = 0
; GPRIDX-NEXT: enable_sgpr_private_segment_buffer = 1
; GPRIDX-NEXT: enable_sgpr_dispatch_ptr = 1
; GPRIDX-NEXT: enable_sgpr_queue_ptr = 0
; GPRIDX-NEXT: enable_sgpr_queue_ptr = 1
; GPRIDX-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GPRIDX-NEXT: enable_sgpr_dispatch_id = 1
; GPRIDX-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -3130,7 +3130,7 @@ define amdgpu_kernel void @dyn_extract_v5f64_s_s(ptr addrspace(1) %out, i32 %sel
; MOVREL-NEXT: enable_exception = 0
; MOVREL-NEXT: enable_sgpr_private_segment_buffer = 1
; MOVREL-NEXT: enable_sgpr_dispatch_ptr = 1
; MOVREL-NEXT: enable_sgpr_queue_ptr = 0
; MOVREL-NEXT: enable_sgpr_queue_ptr = 1
; MOVREL-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; MOVREL-NEXT: enable_sgpr_dispatch_id = 1
; MOVREL-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -3222,7 +3222,7 @@ define amdgpu_kernel void @dyn_extract_v5f64_s_s(ptr addrspace(1) %out, i32 %sel
; GFX10-NEXT: enable_exception = 0
; GFX10-NEXT: enable_sgpr_private_segment_buffer = 1
; GFX10-NEXT: enable_sgpr_dispatch_ptr = 1
; GFX10-NEXT: enable_sgpr_queue_ptr = 0
; GFX10-NEXT: enable_sgpr_queue_ptr = 1
; GFX10-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GFX10-NEXT: enable_sgpr_dispatch_id = 1
; GFX10-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -3314,7 +3314,7 @@ define amdgpu_kernel void @dyn_extract_v5f64_s_s(ptr addrspace(1) %out, i32 %sel
; GFX11-NEXT: enable_exception = 0
; GFX11-NEXT: enable_sgpr_private_segment_buffer = 0
; GFX11-NEXT: enable_sgpr_dispatch_ptr = 1
; GFX11-NEXT: enable_sgpr_queue_ptr = 0
; GFX11-NEXT: enable_sgpr_queue_ptr = 1
; GFX11-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GFX11-NEXT: enable_sgpr_dispatch_id = 1
; GFX11-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -4054,7 +4054,7 @@ define amdgpu_kernel void @dyn_extract_v4f32_s_s_s(ptr addrspace(1) %out, i32 %s
; GPRIDX-NEXT: enable_exception = 0
; GPRIDX-NEXT: enable_sgpr_private_segment_buffer = 1
; GPRIDX-NEXT: enable_sgpr_dispatch_ptr = 1
; GPRIDX-NEXT: enable_sgpr_queue_ptr = 0
; GPRIDX-NEXT: enable_sgpr_queue_ptr = 1
; GPRIDX-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GPRIDX-NEXT: enable_sgpr_dispatch_id = 1
; GPRIDX-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -4138,7 +4138,7 @@ define amdgpu_kernel void @dyn_extract_v4f32_s_s_s(ptr addrspace(1) %out, i32 %s
; MOVREL-NEXT: enable_exception = 0
; MOVREL-NEXT: enable_sgpr_private_segment_buffer = 1
; MOVREL-NEXT: enable_sgpr_dispatch_ptr = 1
; MOVREL-NEXT: enable_sgpr_queue_ptr = 0
; MOVREL-NEXT: enable_sgpr_queue_ptr = 1
; MOVREL-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; MOVREL-NEXT: enable_sgpr_dispatch_id = 1
; MOVREL-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -4223,7 +4223,7 @@ define amdgpu_kernel void @dyn_extract_v4f32_s_s_s(ptr addrspace(1) %out, i32 %s
; GFX10-NEXT: enable_exception = 0
; GFX10-NEXT: enable_sgpr_private_segment_buffer = 1
; GFX10-NEXT: enable_sgpr_dispatch_ptr = 1
; GFX10-NEXT: enable_sgpr_queue_ptr = 0
; GFX10-NEXT: enable_sgpr_queue_ptr = 1
; GFX10-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GFX10-NEXT: enable_sgpr_dispatch_id = 1
; GFX10-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -4308,7 +4308,7 @@ define amdgpu_kernel void @dyn_extract_v4f32_s_s_s(ptr addrspace(1) %out, i32 %s
; GFX11-NEXT: enable_exception = 0
; GFX11-NEXT: enable_sgpr_private_segment_buffer = 0
; GFX11-NEXT: enable_sgpr_dispatch_ptr = 1
; GFX11-NEXT: enable_sgpr_queue_ptr = 0
; GFX11-NEXT: enable_sgpr_queue_ptr = 1
; GFX11-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GFX11-NEXT: enable_sgpr_dispatch_id = 1
; GFX11-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -4399,7 +4399,7 @@ define amdgpu_kernel void @dyn_extract_v4f64_s_s_s(ptr addrspace(1) %out, i32 %s
; GPRIDX-NEXT: enable_exception = 0
; GPRIDX-NEXT: enable_sgpr_private_segment_buffer = 1
; GPRIDX-NEXT: enable_sgpr_dispatch_ptr = 1
; GPRIDX-NEXT: enable_sgpr_queue_ptr = 0
; GPRIDX-NEXT: enable_sgpr_queue_ptr = 1
; GPRIDX-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GPRIDX-NEXT: enable_sgpr_dispatch_id = 1
; GPRIDX-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -4486,7 +4486,7 @@ define amdgpu_kernel void @dyn_extract_v4f64_s_s_s(ptr addrspace(1) %out, i32 %s
; MOVREL-NEXT: enable_exception = 0
; MOVREL-NEXT: enable_sgpr_private_segment_buffer = 1
; MOVREL-NEXT: enable_sgpr_dispatch_ptr = 1
; MOVREL-NEXT: enable_sgpr_queue_ptr = 0
; MOVREL-NEXT: enable_sgpr_queue_ptr = 1
; MOVREL-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; MOVREL-NEXT: enable_sgpr_dispatch_id = 1
; MOVREL-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -4574,7 +4574,7 @@ define amdgpu_kernel void @dyn_extract_v4f64_s_s_s(ptr addrspace(1) %out, i32 %s
; GFX10-NEXT: enable_exception = 0
; GFX10-NEXT: enable_sgpr_private_segment_buffer = 1
; GFX10-NEXT: enable_sgpr_dispatch_ptr = 1
; GFX10-NEXT: enable_sgpr_queue_ptr = 0
; GFX10-NEXT: enable_sgpr_queue_ptr = 1
; GFX10-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GFX10-NEXT: enable_sgpr_dispatch_id = 1
; GFX10-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down Expand Up @@ -4662,7 +4662,7 @@ define amdgpu_kernel void @dyn_extract_v4f64_s_s_s(ptr addrspace(1) %out, i32 %s
; GFX11-NEXT: enable_exception = 0
; GFX11-NEXT: enable_sgpr_private_segment_buffer = 0
; GFX11-NEXT: enable_sgpr_dispatch_ptr = 1
; GFX11-NEXT: enable_sgpr_queue_ptr = 0
; GFX11-NEXT: enable_sgpr_queue_ptr = 1
; GFX11-NEXT: enable_sgpr_kernarg_segment_ptr = 1
; GFX11-NEXT: enable_sgpr_dispatch_id = 1
; GFX11-NEXT: enable_sgpr_flat_scratch_init = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; OBJDUMP-NEXT: 0010 00000000 00000000 00000000 00000000 ................
; OBJDUMP-NEXT: 0020 00000000 00000000 00000000 00000000 ................
; OBJDUMP-NOT: 0030 0000af00 94130000 1a000400 00000000 ................
; OBJDUMP-NEXT: 0030 8000af00 98130000 1a000400 00000000 ................
; OBJDUMP-NEXT: 0030 8000af00 98130000 1e000400 00000000 ................

; ASM-LABEL: amdhsa_kernarg_preload_4_implicit_6:
; ASM: .amdhsa_user_sgpr_count 12
Expand Down
7 changes: 3 additions & 4 deletions llvm/test/CodeGen/AMDGPU/attributor-noopt.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: sed 's/CODE_OBJECT_VERSION/500/g' %s | opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -O2 | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 | FileCheck -check-prefix=OPT %s
; RUN: sed 's/CODE_OBJECT_VERSION/400/g' %s | opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -O0 | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 | FileCheck -check-prefixes=NOOPT,COV4 %s
; RUN: sed 's/CODE_OBJECT_VERSION/500/g' %s | opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -O0 | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 | FileCheck -check-prefixes=NOOPT,COV5 %s
; RUN: sed 's/CODE_OBJECT_VERSION/400/g' %s | opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -O0 | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 | FileCheck -check-prefix=NOOPT %s
; RUN: sed 's/CODE_OBJECT_VERSION/500/g' %s | opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -O0 | llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 | FileCheck -check-prefix=NOOPT %s

; Check that AMDGPUAttributor is not run with -O0.
; OPT: .amdhsa_user_sgpr_private_segment_buffer 1
Expand All @@ -19,8 +19,7 @@

; NOOPT: .amdhsa_user_sgpr_private_segment_buffer 1
; NOOPT: .amdhsa_user_sgpr_dispatch_ptr 1
; COV4: .amdhsa_user_sgpr_queue_ptr 1
; COV5: .amdhsa_user_sgpr_queue_ptr 0
; NOOPT: .amdhsa_user_sgpr_queue_ptr 1
; NOOPT: .amdhsa_user_sgpr_kernarg_segment_ptr 1
; NOOPT: .amdhsa_user_sgpr_dispatch_id 1
; NOOPT: .amdhsa_user_sgpr_flat_scratch_init 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ define hidden void @use_queue_ptr() #1 {

; GCN-LABEL: {{^}}kern_indirect_use_queue_ptr:
; GCN: s_swappc_b64 s[30:31], s[10:11]
; GCN: .amdhsa_user_sgpr_queue_ptr 0
; GCN: .amdhsa_user_sgpr_queue_ptr 1
define amdgpu_kernel void @kern_indirect_use_queue_ptr(i32) #1 {
call void @use_queue_ptr()
ret void
Expand Down Expand Up @@ -470,7 +470,7 @@ define hidden void @use_every_sgpr_input() #1 {

; GCN: .amdhsa_user_sgpr_private_segment_buffer 1
; GCN: .amdhsa_user_sgpr_dispatch_ptr 1
; GCN: .amdhsa_user_sgpr_queue_ptr 0
; GCN: .amdhsa_user_sgpr_queue_ptr 1
; GCN: .amdhsa_user_sgpr_kernarg_segment_ptr 1
; GCN: .amdhsa_user_sgpr_dispatch_id 1
; GCN: .amdhsa_user_sgpr_flat_scratch_init 1
Expand All @@ -495,7 +495,7 @@ define amdgpu_kernel void @kern_indirect_use_every_sgpr_input(i8) #1 {

; GCN: .amdhsa_user_sgpr_private_segment_buffer 1
; GCN: .amdhsa_user_sgpr_dispatch_ptr 1
; GCN: .amdhsa_user_sgpr_queue_ptr 0
; GCN: .amdhsa_user_sgpr_queue_ptr 1
; GCN: .amdhsa_user_sgpr_kernarg_segment_ptr 0
; GCN: .amdhsa_user_sgpr_dispatch_id 1
; GCN: .amdhsa_user_sgpr_flat_scratch_init 1
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/CodeGen/AMDGPU/gfx11-user-sgpr-init16-bug.ll
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ define amdgpu_kernel void @minimal_kernel_inputs_with_stack() #0 {
; WORKAROUND: .amdhsa_user_sgpr_count 15
; NOWORKAROUND: .amdhsa_user_sgpr_count 4
; GCN-NEXT: .amdhsa_user_sgpr_dispatch_ptr 0
; GCN-NEXT: .amdhsa_user_sgpr_queue_ptr 0
; GCN-NEXT: .amdhsa_user_sgpr_queue_ptr 1
; GCN-NEXT: .amdhsa_user_sgpr_kernarg_segment_ptr 1
; GCN-NEXT: .amdhsa_user_sgpr_dispatch_id 0
; GCN-NEXT: .amdhsa_user_sgpr_private_segment_size 0
Expand Down Expand Up @@ -140,7 +140,7 @@ define amdgpu_kernel void @queue_ptr() #1 {
; WORKAROUND: .amdhsa_user_sgpr_count 13
; NOWORKAROUND: .amdhsa_user_sgpr_count 8
; GCN-NEXT: .amdhsa_user_sgpr_dispatch_ptr 1
; GCN-NEXT: .amdhsa_user_sgpr_queue_ptr 0
; GCN-NEXT: .amdhsa_user_sgpr_queue_ptr 1
; GCN-NEXT: .amdhsa_user_sgpr_kernarg_segment_ptr 1
; GCN-NEXT: .amdhsa_user_sgpr_dispatch_id 1
; GCN-NEXT: .amdhsa_user_sgpr_private_segment_size 0
Expand Down

0 comments on commit c93e001

Please sign in to comment.