[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

Adam Yang via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 16:16:58 PST 2025


================
@@ -0,0 +1,143 @@
+; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s
+
+; Test that for scalar values, WaveActiveMax maps down to the DirectX op
+
+define noundef half @wave_active_max_half(half noundef %expr) {
+entry:
+; CHECK: call half @dx.op.waveActiveOp.f16(i32 119, half %expr, i8 3, i8 0)
----------------
adam-yang wrote:

Right now waveActiveOp is marked with `memory(none)`. With dxcompiler, there's no memory related attribute. Maybe we should update the DxilOP attribute to match that.

https://github.com/llvm/llvm-project/pull/123428


More information about the llvm-commits mailing list