[llvm] [DAG] Fold (umin (sub a b) a) -> (usubo a b); (select usubo.1 a usubo.0) (PR #161651)

Chaitanya Koparkar via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 04:44:49 PDT 2025


================
@@ -0,0 +1,16 @@
+; RUN: llc < %s -mtriple=x86_64 | FileCheck %s
+
+; GitHub issue #161036
+
+define i64 @subIfNoUnderflow_umin(i64 %a, i64 %b) {
----------------
ckoparkar wrote:

Is `underflow_compare_fold` better?

https://github.com/llvm/llvm-project/pull/161651


More information about the llvm-commits mailing list