[all-commits] [llvm/llvm-project] 2bd464: [AArch64][GlobalISel] Walk through G_AND in TB(N)Z...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Mon Feb 3 11:53:54 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bd46444d73436b121c4accd7d2f21e1fa7229ae
      https://github.com/llvm/llvm-project/commit/2bd46444d73436b121c4accd7d2f21e1fa7229ae
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2020-02-03 (Mon, 03 Feb 2020)

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

  Log Message:
  -----------
  [AArch64][GlobalISel] Walk through G_AND in TB(N)Z bit calculation

Given

```
tb(n)z (and x, m), b
```

Where the `b`-th bit of `m` is 1,

```
tb(n)z (and x, m), b == tb(n)z x, b
```

So, we can walk past a `G_AND` in this case.

Also add test/CodeGen/AArch64/GlobalISel/opt-fold-and-tbz-tbnz.mir to test this.

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




More information about the All-commits mailing list