Issue 152585
Summary [HLSL][DirectX] `dot2add` generating invalid DXILOpFunction
Labels new issue
Assignees
Reporter kmpeng
    Discovered while running the offload-test-suite.

https://godbolt.org/z/MYhG9xhTT
```hlsl
StructuredBuffer<half2> A : register(t0);
StructuredBuffer<half2> B : register(t1);
StructuredBuffer<float> Acc : register(t2);

RWStructuredBuffer<float> Out : register(u3);

[numthreads(1,1,1)]
void main() {
  Out[0] = dot2add(A[0], B[0], Acc[0]);
}
```
This code is producing this error:
```
# .---command stdout------------
# | Function: main: error: 'dx.op.dot2AddHalf' is not a DXILOpFuncition for DXILOpcode 'Dot2AddHalf'.
# | note: at '%dx.dot2add.i47 = call float @dx.op.dot2AddHalf(i32 162, float %5, half %7, half %9, half %11, half %13) #3' in block 'entry' of function 'main'.
# | Function: dx.op.dot2AddHalf.f32: error: External function 'dx.op.dot2AddHalf.f32' is unused.
# | Validation failed.
# | 
# `-----------------------------
# .---command stderr------------
# | clang-dxc: error: dxv command failed with exit code 1 (use -v to see invocation)
# `-----------------------------
# error: command failed with exit status: 1
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to