[all-commits] [llvm/llvm-project] c8c987: [AArch64][GlobalISel] Fold in G_ANYEXT/G_ZEXT into...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Thu Jan 30 14:51:37 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c8c987d3105a9bc9bab241946ec96c36783ed120
      https://github.com/llvm/llvm-project/commit/c8c987d3105a9bc9bab241946ec96c36783ed120
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2020-01-30 (Thu, 30 Jan 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
    A llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-ext-tbz-tbnz.mir

  Log Message:
  -----------
  [AArch64][GlobalISel] Fold in G_ANYEXT/G_ZEXT into TB(N)Z

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.

Differential Revision: https://reviews.llvm.org/D73673




More information about the All-commits mailing list