[PATCH] D126008: [GISel] Add new combines for G_FMUL with constant operands

Michael Kitzan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 12:37:29 PDT 2022


mkitzan created this revision.
mkitzan added reviewers: arsenm, paquette, aemerson, foad, aditya_nandakumar, dsanders.
mkitzan added a project: LLVM.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
mkitzan requested review of this revision.
Herald added subscribers: llvm-commits, wdng.

Patch adds new GICombineRules for G_FMUL:

- G_FMUL(G_FMUL(x, c0), c1) -> G_FMUL(x, c0 * c1) (unsafe fp math only)
- G_FMUL(G_FADD(x, x), c) -> G_FMUL(x, c * 2.0) (unsafe fp math only)

Patch additionally adds new combine tests for AArch64 target for these new rules.
(Split off from https://reviews.llvm.org/D87870)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126008

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/combine-fmul.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126008.430777.patch
Type: text/x-patch
Size: 12632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220519/38ae5edc/attachment.bin>


More information about the llvm-commits mailing list