================ @@ -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)"; + let intrinsics = [IntrinSelect<int_uadd_with_overflow>]; ---------------- Icohedron wrote:
I'm not sure I understand the concern. `UAddc` and `int_uadd_with_overflow` are equivalent operations on inputs of `uint32_t` type. Vectors of `uint32_t` must be scalarized to be lowered to `UAddc`. Other types accepted by `int_uadd_with_overflow` (`uint16_t` and `uint64_t` scalars or vectors) are not currently able to be lowered to DXIL. Attempting to lower to DXIL results in an error like the following: `error: <unknown>:0:0: in function uaddci16 i16 (i16, i16): Cannot create UAddc operation: Invalid overload type`. But they could be supported 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