[llvm] [InstCombine] Detect uadd with overflow idiom (PR #140178)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 6 20:36:02 PDT 2025
================
@@ -2350,4 +2350,57 @@ define i8 @fold_add_umax_to_usub_multiuse(i8 %a) {
ret i8 %sel
}
+define i32 @uadd_with_zext(i32 %x, i32 %y) {
+; CHECK-LABEL: @uadd_with_zext(
+; CHECK-NEXT: [[COND:%.*]] = call i32 @llvm.uadd.sat.i32(i32 [[X:%.*]], i32 [[Y:%.*]])
+; CHECK-NEXT: ret i32 [[COND]]
+;
----------------
AZero13 wrote:
The description of the test describes the input, I wasn't aware that it's meant to describe the output
https://github.com/llvm/llvm-project/pull/140178
More information about the llvm-commits
mailing list