[all-commits] [llvm/llvm-project] b9bf93: [AArch64][GlobalISel] Walk through G_TRUNC in getT...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Fri Jan 31 11:11:17 PST 2020


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

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

  Log Message:
  -----------
  [AArch64][GlobalISel] Walk through G_TRUNC in getTestBitReg

When you encounter a G_TRUNC, you are moving from a larger type to a smaller
type.

Asking for the i-th bit on a larger value is the same as asking for the i-th
bit on a smaller value.

So, we should always be able to walk through G_TRUNC when computing the bit
for a TB(N)Z.

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




More information about the All-commits mailing list