<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">I was looking at the overflowing operations because I was trying to deal with the legalization and selection of wide adds, and I wasn’t sure on the finer points of some of the semantics.</div><div class="">I’m specifically looking at the addition/subtraction operations:</div><div class=""><br class=""></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">    G_UADDO, G_SADDO, G_USUBO, G_SSUBO</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">    G_UADDE, G_SADDE, G_USUBE, G_SSUBE</span></font></div><div class=""><br class=""></div><div class="">Is it correct that the <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">S*</span></font> operations set the carry-out value when they have a signed overflow, and the <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">U*</span></font> operations when they have an unsigned overflow?</div><div class="">Particularly, is there any difference between them if the carry-out isn’t used by anything?</div><div class="">I would expect that a decomposed wide add would have a sequence like the following:</div><div class=""><br class=""></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">    G_UADDO</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">    G_UADDE</span></font></div><div class=""><font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">    ...</span></font></div><div class=""><br class=""></div><div class="">Would that just need to end with a <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">G_SADDE</span></font> when implementing an operation like Rust's <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">i128::checked_add()</span></font>?</div><div class=""><br class=""></div><div class="">Finally, Is there a reason that <font face="FiraCode-Regular" class="">G_SADDE</font> and <font face="FiraCode-Regular" class="">G_SSUBE</font> aren’t legal in the AArch64 backend? (Particularly while <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">G_SADDO</span></font> and <font face="FiraCode-Regular" class=""><span style="font-style: normal;" class="">G_SSUBO</span></font> are.)</div><div class="">They seem like they have the potential to produce bad code if used in the middle of a sequence like that, but I don’t know if that’s a reason to make them illegal so I was wondering if there was something else I was missing.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">— Cassie</div><div class=""><br class=""></div></body></html>