[llvm] [CGP]: Optimize mul.overflow. (PR #148343)
Hassnaa Hamdi via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 2 21:09:34 PDT 2025
================
@@ -395,7 +446,21 @@ define { i128, i8 } @i128_checked_mul(i128 %x, i128 %y) {
define { i128, i8 } @i128_overflowing_mul(i128 %x, i128 %y) {
; CHECK-LABEL: i128_overflowing_mul:
-; CHECK: // %bb.0:
+; CHECK: // %bb.0: // %overflow.entry
+; CHECK-NEXT: cmp x1, x0, asr #63
+; CHECK-NEXT: b.ne .LBB22_3
+; CHECK-NEXT: // %bb.1: // %overflow.entry
+; CHECK-NEXT: asr x8, x2, #63
+; CHECK-NEXT: cmp x3, x8
+; CHECK-NEXT: b.ne .LBB22_3
----------------
hassnaaHamdi wrote:
Yeah, I see. Thanks for the clarification :))
What about the new proposed solution instead of reducing the cases ?
https://github.com/llvm/llvm-project/pull/148343
More information about the llvm-commits
mailing list