[llvm] [GlobalISel] Add a fadd 0.0 combine with nsz (PR #153748)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 05:40:58 PDT 2025
================
@@ -560,6 +560,13 @@ def right_identity_neg_zero_fp: GICombineRule<
(apply (GIReplaceReg $dst, $x))
>;
+def right_identity_neg_zero_fp_nsz: GICombineRule<
+ (defs root:$dst),
+ (match (G_FADD $dst, $x, $y, (MIFlags FmNsz)):$root,
+ [{ return Helper.matchConstantFPOp(${y}, 0.0); }]),
----------------
arsenm wrote:
We probably should have a dedicated isZero mirroring afloat
https://github.com/llvm/llvm-project/pull/153748
More information about the llvm-commits
mailing list