[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
Mon Nov 10 05:23:22 PST 2025
================
@@ -0,0 +1,53 @@
+; RUN: llc < %s -mtriple=aarch64 | FileCheck %s
+
+; GitHub issue #161036
+
+; Positive test : umin(sub(a,b),a) with scalar types should be folded
+define i64 @underflow_compare_fold(i64 %a, i64 %b) {
----------------
ckoparkar wrote:
Good catch, fixed.
https://github.com/llvm/llvm-project/pull/161651
More information about the llvm-commits
mailing list