[llvm] [GlobalISel] replace right identity X * -1.0 with fneg(x) (PR #80526)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 01:23:08 PST 2024
================
@@ -493,6 +493,13 @@ def right_identity_one_fp: GICombineRule<
(apply (GIReplaceReg $dst, $x))
>;
+def right_identity_neg_one_fp: GICombineRule<
+ (defs root:$dst),
+ (match (G_FMUL $dst, $x, $y):$root,
+ [{ return Helper.matchConstantFPOp(${y}, -1.0); }]),
----------------
arsenm wrote:
Can't we match inline FP constants in the pattern? @Pierre-vh
https://github.com/llvm/llvm-project/pull/80526
More information about the llvm-commits
mailing list