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
58 lines
1.9 KiB
LLVM
58 lines
1.9 KiB
LLVM
; RUN: opt -S -dxil-op-lower %s | FileCheck %s
|
|
|
|
; Make sure dxil operation function calls for all ComputeID dxil operations are generated.
|
|
|
|
target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
|
|
target triple = "dxil-pc-shadermodel6.7-compute"
|
|
|
|
; CHECK-LABEL: @test_thread_id(
|
|
; Function Attrs: noinline nounwind optnone
|
|
define i32 @test_thread_id(i32 %a) #0 {
|
|
entry:
|
|
; CHECK:call i32 @dx.op.threadId.i32(i32 93, i32 %{{.*}})
|
|
%0 = call i32 @llvm.dx.thread.id(i32 %a)
|
|
ret i32 %0
|
|
}
|
|
|
|
; CHECK-LABEL: @test_group_id(
|
|
; Function Attrs: noinline nounwind optnone
|
|
define i32 @test_group_id(i32 %a) #0 {
|
|
entry:
|
|
; CHECK: call i32 @dx.op.groupId.i32(i32 94, i32 %{{.*}})
|
|
%0 = call i32 @llvm.dx.group.id(i32 %a)
|
|
ret i32 %0
|
|
}
|
|
|
|
; CHECK-LABEL: @test_thread_id_in_group(
|
|
; Function Attrs: noinline nounwind optnone
|
|
define i32 @test_thread_id_in_group(i32 %a) #0 {
|
|
entry:
|
|
; CHECK: call i32 @dx.op.threadIdInGroup.i32(i32 95, i32 %{{.*}})
|
|
%0 = call i32 @llvm.dx.thread.id.in.group(i32 %a)
|
|
ret i32 %0
|
|
}
|
|
|
|
; CHECK-LABEL: @test_flattened_thread_id_in_group(
|
|
; Function Attrs: noinline nounwind optnone
|
|
define i32 @test_flattened_thread_id_in_group() #0 {
|
|
entry:
|
|
; CHECK: call i32 @dx.op.flattenedThreadIdInGroup.i32(i32 96)
|
|
%0 = call i32 @llvm.dx.flattened.thread.id.in.group()
|
|
ret i32 %0
|
|
}
|
|
|
|
; CHECK-DAG: declare i32 @dx.op.threadId.i32(i32, i32) #[[#ATTR0:]]
|
|
; CHECK-DAG: declare i32 @dx.op.groupId.i32(i32, i32) #[[#ATTR0]]
|
|
; CHECK-DAG: declare i32 @dx.op.flattenedThreadIdInGroup.i32(i32) #[[#ATTR0]]
|
|
; CHECK-DAG: declare i32 @dx.op.threadIdInGroup.i32(i32, i32) #[[#ATTR0]]
|
|
; CHECK: attributes #[[#ATTR0]] = { nounwind memory(none) }
|
|
|
|
; Function Attrs: nounwind readnone willreturn
|
|
declare i32 @llvm.dx.thread.id(i32) #1
|
|
declare i32 @llvm.dx.group.id(i32) #1
|
|
declare i32 @llvm.dx.flattened.thread.id.in.group() #1
|
|
declare i32 @llvm.dx.thread.id.in.group(i32) #1
|
|
|
|
attributes #0 = { noinline nounwind }
|
|
attributes #1 = { nounwind readnone willreturn }
|