[all-commits] [llvm/llvm-project] 59cbee: [GlobalISel] Fix an incorrect ptradd reassoc test....

Amara Emerson via All-commits all-commits at lists.llvm.org
Mon Sep 4 00:29:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 59cbee45995ef5d93778867e3ccd7598cb6cccb7
      https://github.com/llvm/llvm-project/commit/59cbee45995ef5d93778867e3ccd7598cb6cccb7
  Author: Amara Emerson <amara at apple.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M llvm/test/CodeGen/AArch64/GlobalISel/combine-ptradd-reassociation.mir

  Log Message:
  -----------
  [GlobalISel] Fix an incorrect ptradd reassoc test. NFC.

The lookthrough int<->ptr cast tests and code were both wrongly checking the wrong
register uses. This change is fixing and precommiting the test to prepare for
the code fix.


  Commit: 0065640f40125e79d4538089b160e35d4f2d24fb
      https://github.com/llvm/llvm-project/commit/0065640f40125e79d4538089b160e35d4f2d24fb
  Author: Amara Emerson <amara at apple.com>
  Date:   2023-09-04 (Mon, 04 Sep 2023)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/combine-ptradd-reassociation.mir

  Log Message:
  -----------
  [GlobalISel] Look through a G_PTR_ADD's def register instead of it's source operand's
uses when looking for load/store users. This was a simple logic bug during translation
of the equivalent function in SelectionDAG:
```
    for (SDNode *Node : N->uses()) {
      if (auto *LoadStore = dyn_cast<MemSDNode>(Node)) {
```


Compare: https://github.com/llvm/llvm-project/compare/b70f1f836da9...0065640f4012


More information about the All-commits mailing list