
There were some issues with these ops: - The overload wasn't being specified (`dx.op.dot4AddPacked` vs `dx.op.dot4AddPacked.i32`) - The versioning wasn't correct (These ops were added in SM 6.4) - The argument order was off - while the HLSL function has the accumulator as the last argument, the DXIL op lists it first. This fixes the DXIL.td definition and adjusts the LLVM DX and SPIRV intrinsics to match the argument order in DXIL rather than the argument order in HLSL. Fixes #139018
13 lines
429 B
LLVM
13 lines
429 B
LLVM
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.4-compute %s | FileCheck %s
|
|
|
|
define void @main(i32 %acc, i32 %x, i32 %y) {
|
|
entry:
|
|
; CHECK: call i32 @dx.op.dot4AddPacked.i32(i32 164, i32 %acc, i32 %x, i32 %y) #[[#ATTR:]]
|
|
%0 = call i32 @llvm.dx.dot4add.u8packed(i32 %acc, i32 %x, i32 %y)
|
|
ret void
|
|
}
|
|
|
|
; CHECK: attributes #[[#ATTR]] = {{{.*}} memory(none) {{.*}}}
|
|
|
|
declare i32 @llvm.dx.dot4add.u8packed(i32, i32, i32)
|