[PATCH] D87870: [GISel] Add new combines for G_FMUL
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 01:27:39 PST 2020
foad added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h:358
+ /// Transform G_FMUL(x, -1.0) to G_FSUB(0.0, x)
+ bool applyCombineFMulByNegativeOne(MachineInstr &MI);
----------------
I think this should be "G_FSUB(-0.0, x)".
================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:491
+// Transform (fmul x, 0.0) -> 0.0
+def fmul_by_zero: GICombineRule<
----------------
This is wrong if x is Inf or NaN.
================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:499
+
+// Transform (fmul x, -1.0) -> (fsub 0.0, x)
+def fmul_by_neg_one: GICombineRule <
----------------
"-0.0".
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87870/new/
https://reviews.llvm.org/D87870
More information about the llvm-commits
mailing list