[llvm] [InstCombine] Fold smin(-a, x - a) + a to smin(x, 0) (PR #167109)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 8 01:45:50 PST 2025
================
@@ -83,3 +83,18 @@ entry:
%res = add nuw nsw i32 %min, %max
ret i32 %res
}
+
+
+define i32 @sadd_min_neg(i32 %x, i32 %a) {
+; CHECK-LABEL: @sadd_min_neg(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[RES:%.*]] = call i32 @llvm.smin.i32(i32 [[A:%.*]], i64 5)
----------------
dtcxzyw wrote:
The CI failed: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/add-min-max.ll:91:15: error: CHECK-NEXT: expected string not found in input
Do you use LLM to generate check lines instead of UTC?
Please read https://llvm.org/docs/InstCombineContributorGuide.html#tests
https://github.com/llvm/llvm-project/pull/167109
More information about the llvm-commits
mailing list