[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 26 13:52:44 PST 2025
================
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> {
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
}
+def UAddc : DXILOp<44, binaryWithCarryOrBorrow > {
+ let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) = (a+b, a+b overflowed ? 1 : 0)";
----------------
bogner wrote:
We should be consistent and match the docs in [DXIL.rst](https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#operations-via-external-functions) for these (even though in this case that wording is a little awkward).
```suggestion
let Doc = "unsigned add of 32-bit operand with the carry";
```
https://github.com/llvm/llvm-project/pull/127137
More information about the cfe-commits
mailing list