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

One thing I am a little worried about is if we are misusing 
`int_uadd_with_overflow` here. This kind feels like a square is a rectangle but 
rectangles are not squares cases where llvm is using `int_uadd_with_overflow` 
much more broadly than we are. It makes me think If something else were to come 
along and emit `int_uadd_with_overflow` and it wasn't a `uint32_t2` or 
`uint32_t4` case would we be doing the right thing by associating the overflow 
intrinsic with `UAddc`?

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