[llvm-branch-commits] [llvm] InstCombine: Add more tests for min/max SimplifyDemandedFPClass (PR #175381)
Yingwei Zheng via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jan 13 09:28:35 PST 2026
================
@@ -370,6 +385,32 @@ define nofpclass(snan) float @cannot_fold_negative_or_zero__positive_or_zero_1()
ret float %result
}
+define nofpclass(snan) float @nsz_fold_negative_or_zero__positive_or_zero_0() {
+; CHECK-LABEL: define nofpclass(snan) float @nsz_fold_negative_or_zero__positive_or_zero_0() {
+; CHECK-NEXT: [[MUST_BE_NEGATIVE_OR_ZERO:%.*]] = call float @returns_positive_or_zero()
+; CHECK-NEXT: [[MUST_BE_POSITIVE_OR_ZERO:%.*]] = call float @returns_negative_or_zero()
+; CHECK-NEXT: [[RESULT:%.*]] = call nnan nsz float @llvm.maximum.f32(float [[MUST_BE_NEGATIVE_OR_ZERO]], float [[MUST_BE_POSITIVE_OR_ZERO]])
+; CHECK-NEXT: ret float [[RESULT]]
+;
+ %must.be.negative.or.zero = call float @returns_positive_or_zero()
----------------
dtcxzyw wrote:
Wrong value name.
https://github.com/llvm/llvm-project/pull/175381
More information about the llvm-branch-commits
mailing list