[PATCH] D126005: [GISel] Add identity and fneg combines for G_FMUL

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


mkitzan created this revision.
mkitzan added reviewers: arsenm, paquette, aditya_nandakumar, foad, aemerson, 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 two simple combines:

- G_FMUL(x, 1.0) -> x
- G_FMUL(G_FNEG(x), G_FNEG(y)) -> G_FMUL(x, y)

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/D126005

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: D126005.430773.patch
Type: text/x-patch
Size: 9332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220519/a92d3de0/attachment.bin>


More information about the llvm-commits mailing list