[llvm] [LLVM] Make s_getpc_b64 rematerializable (PR #71823)

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 13:53:14 PST 2023


https://github.com/nhaehnle commented:

The test case doesn't actually show the `S_GETPC_B64`s as getting merged or rematerialized. I suspect we want a test structure like:
```
  %x = s_getpc_b64
  inline asm that uses approximately all SGPRs
  use %x here
```
as a pre-commit which should spill `%x` without your change. And then your change causes it to instead rematerialize the s_getpc_b64.

Keep the pre-commit in the same PR, i.e. your PR should have two commits:

1. Add the new test with the CHECK lines corresponding to behavior before your change
2. The change to isRematerializable plus changes to the test caused by it

https://github.com/llvm/llvm-project/pull/71823


More information about the llvm-commits mailing list