CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
68 lines
2.3 KiB
LLVM
68 lines
2.3 KiB
LLVM
; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefixes=CHECK,WAVE64 %s
|
|
; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=tonga < %s | FileCheck -check-prefixes=CHECK,WAVE64 %s
|
|
; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1010 < %s | FileCheck -check-prefixes=CHECK,WAVE32 %s
|
|
; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1010 < %s | FileCheck -check-prefixes=CHECK,WAVE32 %s
|
|
; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=CHECK,WAVE32 %s
|
|
; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=CHECK,WAVE32 %s
|
|
|
|
;CHECK-LABEL: {{^}}ret:
|
|
;CHECK: v_cmp_eq_u32_e32 [[CMP:[^,]+]], v0, v1
|
|
;WAVE64: s_wqm_b64 [[WQM:[^,]+]], [[CMP]]
|
|
;WAVE32: s_wqm_b32 [[WQM:[^,]+]], [[CMP]]
|
|
;CHECK: v_cndmask_b32_e64 v0, 0, 1.0, [[WQM]]
|
|
define amdgpu_ps float @ret(i32 %v0, i32 %v1) #1 {
|
|
main_body:
|
|
%c = icmp eq i32 %v0, %v1
|
|
%w = call i1 @llvm.amdgcn.wqm.vote(i1 %c)
|
|
%r = select i1 %w, float 1.0, float 0.0
|
|
ret float %r
|
|
}
|
|
|
|
;CHECK-LABEL: {{^}}true:
|
|
;WAVE64: s_wqm_b64
|
|
;WAVE32: s_wqm_b32
|
|
define amdgpu_ps float @true() #1 {
|
|
main_body:
|
|
%w = call i1 @llvm.amdgcn.wqm.vote(i1 true)
|
|
%r = select i1 %w, float 1.0, float 0.0
|
|
ret float %r
|
|
}
|
|
|
|
;CHECK-LABEL: {{^}}false:
|
|
;WAVE64: s_wqm_b64
|
|
;WAVE32: s_wqm_b32
|
|
define amdgpu_ps float @false() #1 {
|
|
main_body:
|
|
%w = call i1 @llvm.amdgcn.wqm.vote(i1 false)
|
|
%r = select i1 %w, float 1.0, float 0.0
|
|
ret float %r
|
|
}
|
|
|
|
; Note: an almost identical test for this exists in llvm.amdgcn.kill.ll
|
|
;CHECK-LABEL: {{^}}kill:
|
|
;CHECK: v_cmp_eq_u32_e32 [[CMP:[^,]+]], v0, v1
|
|
|
|
;WAVE64: s_wqm_b64 [[WQM:[^,]+]], [[CMP]]
|
|
;WAVE64: s_andn2_b64 [[KILL:[^,]+]], exec, [[WQM]]
|
|
;WAVE64: s_andn2_b64 [[MASK:[^,]+]], [[EXEC:[^,]+]], [[KILL]]
|
|
;WAVE64: s_and_b64 exec, exec, [[MASK]]
|
|
|
|
;WAVE32: s_wqm_b32 [[WQM:[^,]+]], [[CMP]]
|
|
;WAVE32: s_and{{n2|_not1}}_b32 [[KILL:[^,]+]], exec_lo, [[WQM]]
|
|
;WAVE32: s_and{{n2|_not1}}_b32 [[MASK:[^,]+]], [[EXEC:[^,]+]], [[KILL]]
|
|
;WAVE32: s_and_b32 exec_lo, exec_lo, [[MASK]]
|
|
|
|
;CHECK: s_endpgm
|
|
define amdgpu_ps float @kill(i32 %v0, i32 %v1) #1 {
|
|
main_body:
|
|
%c = icmp eq i32 %v0, %v1
|
|
%w = call i1 @llvm.amdgcn.wqm.vote(i1 %c)
|
|
call void @llvm.amdgcn.kill(i1 %w)
|
|
ret float 0.0
|
|
}
|
|
|
|
declare void @llvm.amdgcn.kill(i1) #1
|
|
declare i1 @llvm.amdgcn.wqm.vote(i1)
|
|
|
|
attributes #1 = { nounwind }
|