[PATCH] D73673: [AArch64][GlobalISel] Fold in G_ANYEXT/G_ZEXT into TB(N)Z

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 16:23:38 PST 2020


paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: Petar.Avramovic, hiraditya, kristof.beyls, rovka.
Herald added a project: LLVM.

This is similar to the code in getTestBitOperand in AArch64ISelLowering. Instead of implementing all of the TB(N)Z optimizations at once, this patch implements the simplest case first. The way that this is set up should make it fairly easy to add the rest as we go along.

The idea here is that after determining that we can use a TB(N)Z, we can continue looking through instructions and perform further folding.

In this case, when we have a G_ZEXT or G_ANYEXT where the extended bits are not used, we can fold it into the TB(N)Z.


https://reviews.llvm.org/D73673

Files:
  llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-ext-tbz-tbnz.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73673.241315.patch
Type: text/x-patch
Size: 6414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200130/30035b85/attachment.bin>


More information about the llvm-commits mailing list