[PATCH] D83833: [GISel] Add new GISel combiners for G_SELECT

Michael Kitzan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 17:06:51 PDT 2020


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

Patch adds three new `GICombinerRule`s for `G_SELECT`. The rules include: combining selects with `undef` comparisons into their first selectee value, combining selects with one more `undef` selectee values into a non-`undef` selectee value (if one's available, otherwise combine into `undef`), and to combine away selects with constant comparisons. Patch additionally adds a new combiner test for the AArch64 target to test these new `G_SELECT` combiner rules and the existing `select_same_val` combiner rule.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83833

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-select.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83833.278020.patch
Type: text/x-patch
Size: 8913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200715/a6f7e5fd/attachment.bin>


More information about the llvm-commits mailing list