[llvm] [AArch64] Only clear kill flags if necessary when merging str (PR #69680)

Zhaoxuan Jiang via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 20:29:15 PDT 2023


nocchijiang wrote:

> Is it worth adding a test for the specific case you had - "which results in suboptimal register allocation"? Or do you think the existing tests that change enough to show the issue?

Initially I found that a few seemingly mergable `str`s were not merged in the generated machine instructions from the codebase I am working on, then I tried debugging the pass to locate the issue which is the kill flags being unconditionally cleared that prevents register renaming. Slightly better register usages can be observed from the affected tests (`sve-fixed-length-fp128.ll` and `aarch64_generated_funcs.ll.generated.expected`), which is enough to show the issue IMO, but it may still be an overstatement to call it a "register allocation" issue. Please let me know if I should make changes in the commit message and/or add a test to better describe the issue.

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


More information about the llvm-commits mailing list