[PATCH] D87870: [GISel] Add new combines for G_FMUL

Michael Kitzan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 15:10:19 PDT 2020


mkitzan added inline comments.


================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:299
+// Fold (x op 0.0) - > 0.0
+def binop_right_to_fp_zero: GICombineRule<
+  (defs root:$root),
----------------
arsenm wrote:
> mkitzan wrote:
> > jurahul wrote:
> > > Sorry to comment on a change that I know nothing about, but ts this somewhere checking if fast math or equivalent is enabled? Otherwise, X * 0.0 != 0.0 in floating point. 
> > At the moment nothing is checking whether fast math of special flags are enabled, but perhaps it should.
> This probably shouldn't be generalized to "binop". I think this is just fadd and fsub, and both require nsz (although actually I think you don't need nsz for -0)
I choose to generalize it as a `binop` because the `G_MUL` version was implemented in this way (https://reviews.llvm.org/D80094).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87870/new/

https://reviews.llvm.org/D87870



More information about the llvm-commits mailing list