19 lines · plain
1// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \2// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o - | \3// RUN: FileCheck %s -DTARGET=dx4// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \5// RUN: spirv-pc-vulkan-compute %s -emit-llvm -disable-llvm-passes -o - | \6// RUN: FileCheck %s -DTARGET=spv7 8// Test basic lowering to runtime function call.9 10// CHECK-LABEL: test_bool11int test_bool(bool expr) {12 // CHECK: call {{.*}} @llvm.[[TARGET]].wave.active.countbits13 return WaveActiveCountBits(expr);14}15 16// CHECK: declare i32 @llvm.[[TARGET]].wave.active.countbits(i1) #[[#attr:]]17 18// CHECK: attributes #[[#attr]] = {{{.*}} convergent {{.*}}}19