Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

198 lines
5.2 KiB
LLVM

; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
;
; Test that we have the correct shader flags to indicate that there are wave
; ops set at the module level
;
; CHECK: ; Shader Flags Value: [[WAVE_FLAG:0x00080000]]
; CHECK: ; Note: shader requires additional functionality:
; CHECK-NEXT: ; Wave level operations
; CHECK-NEXT: ; Note: extra DXIL module flags:
target triple = "dxil-pc-shadermodel6.7-library"
%dx.types.fouri32 = type { i32, i32, i32, i32 }
; Test the indiviual ops that they have the same Shader Wave flag at the
; function level to ensure that each op is setting it accordingly
define noundef i1 @wave_is_first_lane() {
entry:
; CHECK: Function wave_is_first_lane : [[WAVE_FLAG]]
%ret = call i1 @llvm.dx.wave.is.first.lane()
ret i1 %ret
}
define noundef i32 @wave_getlaneindex() {
entry:
; CHECK: Function wave_getlaneindex : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.getlaneindex()
ret i32 %ret
}
define noundef i1 @wave_any(i1 %x) {
entry:
; CHECK: Function wave_any : [[WAVE_FLAG]]
%ret = call i1 @llvm.dx.wave.any(i1 %x)
ret i1 %ret
}
define noundef i1 @wave_all(i1 %x) {
entry:
; CHECK: Function wave_all : [[WAVE_FLAG]]
%ret = call i1 @llvm.dx.wave.all(i1 %x)
ret i1 %ret
}
define noundef i32 @wave_bit_or(i32 %x) {
entry:
; CHECK: Function wave_bit_or : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.or(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_bit_xor(i32 %x) {
entry:
; CHECK: Function wave_bit_xor : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.xor(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_bit_and(i32 %x) {
entry:
; CHECK: Function wave_bit_and : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.and(i32 %x)
ret i32 %ret
}
define noundef i1 @wave_all_equal(i1 %x) {
entry:
; CHECK: Function wave_all_equal : [[WAVE_FLAG]]
%ret = call i1 @llvm.dx.wave.all.equal(i1 %x)
ret i1 %ret
}
define noundef i1 @wave_readlane(i1 %x, i32 %idx) {
entry:
; CHECK: Function wave_readlane : [[WAVE_FLAG]]
%ret = call i1 @llvm.dx.wave.readlane.i1(i1 %x, i32 %idx)
ret i1 %ret
}
define noundef i32 @wave_reduce_sum(i32 noundef %x) {
entry:
; CHECK: Function wave_reduce_sum : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.sum.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_reduce_usum(i32 noundef %x) {
entry:
; CHECK: Function wave_reduce_usum : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.usum.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_product(i32 noundef %x) {
entry:
; CHECK: Function wave_product : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.product.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_uproduct(i32 noundef %x) {
entry:
; CHECK: Function wave_uproduct : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.uproduct.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_reduce_max(i32 noundef %x) {
entry:
; CHECK: Function wave_reduce_max : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.max.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_reduce_umax(i32 noundef %x) {
entry:
; CHECK: Function wave_reduce_umax : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.umax.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_reduce_min(i32 noundef %x) {
entry:
; CHECK: Function wave_reduce_min : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.min.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_reduce_umin(i32 noundef %x) {
entry:
; CHECK: Function wave_reduce_umin : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.reduce.umin.i32(i32 %x)
ret i32 %ret
}
define void @wave_active_countbits(i1 %expr) {
entry:
; CHECK: Function wave_active_countbits : [[WAVE_FLAG]]
%0 = call i32 @llvm.dx.wave.active.countbits(i1 %expr)
ret void
}
define void @wave_active_ballot(i1 %expr) {
entry:
; CHECK: Function wave_active_ballot : [[WAVE_FLAG]]
%0 = call %dx.types.fouri32 @llvm.dx.wave.ballot(i1 %expr)
ret void
}
define void @wave_prefix_bit_count(i1 %expr) {
entry:
; CHECK: Function wave_prefix_bit_count : [[WAVE_FLAG]]
%0 = call i32 @llvm.dx.wave.prefix.bit.count(i1 %expr)
ret void
}
define noundef i32 @wave_prefix_sum(i32 noundef %x) {
entry:
; CHECK: Function wave_prefix_sum : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.prefix.sum.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_prefix_usum(i32 noundef %x) {
entry:
; CHECK: Function wave_prefix_usum : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.prefix.usum.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_prefix_product(i32 noundef %x) {
entry:
; CHECK: Function wave_prefix_product : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.prefix.product.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @wave_prefix_uproduct(i32 noundef %x) {
entry:
; CHECK: Function wave_prefix_uproduct : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.wave.prefix.uproduct.i32(i32 %x)
ret i32 %ret
}
define noundef i32 @quad_read_across_x_i32(i32 noundef %expr) {
entry:
; CHECK: Function quad_read_across_x_i32 : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.quad.read.across.x.i32(i32 %expr)
ret i32 %ret
}
define noundef i32 @quad_read_across_y_i32(i32 noundef %expr) {
entry:
; CHECK: Function quad_read_across_y_i32 : [[WAVE_FLAG]]
%ret = call i32 @llvm.dx.quad.read.across.y.i32(i32 %expr)
ret i32 %ret
}