================
@@ -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>];
----------------
bogner wrote:

We would need to rev the DXIL version to introduce UAddc for other types I 
think. I think Farzon's concern is that we might want to (at some point) handle 
`int_uadd_with_overflow` generically, and since there isn't a DXIL op for it 
that would presumably involve an expansion. If we use the 32 bit 
`int_uadd_with_overflow` to map to UAddc, then whatever pass did that expansion 
would need to know not to do it for certain overloads and that might be awkward.

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