[PATCH] D86393: [GISel] Add combines for unary FP instrs with constant operand

Michael Kitzan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 23:27:29 PDT 2020


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

Patch adds five new `GICombinerRules`, one for each of the following unary FP instrs: `G_FNEG`, `G_FABS`, `G_FPTRUNC`, `G_FSQRT`, and `G_FLOG2`. The combine rules perform the FP operation on the constant operand and replace the original instr with the result. Patch additionally adds new combiner tests for the AArch64 target to test these new combiner rules.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86393

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-fabs.mir
  llvm/test/CodeGen/AArch64/GlobalISel/combine-flog2.mir
  llvm/test/CodeGen/AArch64/GlobalISel/combine-fneg.mir
  llvm/test/CodeGen/AArch64/GlobalISel/combine-fptrunc.mir
  llvm/test/CodeGen/AArch64/GlobalISel/combine-fsqrt.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86393.287163.patch
Type: text/x-patch
Size: 17270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200822/d9d3b5ac/attachment.bin>


More information about the llvm-commits mailing list