Icohedron wrote:

> The SPIRV test case isn't sufficent. Two reasons.
> 
> 1. Since you are not using `__builtin_addc ` Your codegen path for 
> `uadd.with.overflow` is custom to HLSL. Your emitter is in 
> `EmitHLSLBuiltinExpr`.
> 2. `llvm/test/CodeGen/SPIRV/llvm-intrinsics/uadd.with.overflow.ll` only tests 
> `spirv32` and `spirv64` targets when HLSL uses the `spirv` target
> 
> You can add a `spirv` target to `uadd.with.overflow.ll`. Make sure nothing 
> blows up if we use our target. Second a test case in the hlsl_intrinsics 
> directory is warranted to make sure the custom things you are doing like 
> `CreateShuffleVector` doesn't trigger problems for spirv codegen or for the 
> spirv validator `spirv-val`.

I added `llvm/test/CodeGen/SPIRV/hlsl-intrinsics/AddUint64.ll` to test the 
lowering of the AddUint64 implementation to SPIRV.

I couldn't add the spirv target to the existing 
`llvm/test/CodeGen/SPIRV/llvm-intrinsics/uadd.with.overflow.ll` test because 
doing so results in an error when the test is executed: `error: line 41: 
Operand 2 of Decorate requires one of these capabilities: Kernel
  OpDecorate %a FuncParamAttr Zext`

https://github.com/llvm/llvm-project/pull/127137
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to