[all-commits] [llvm/llvm-project] 3d5e8e: [PAC][CodeGen] Do not emit trivial 'mov xN, xN' on...
Daniil Kovalev via All-commits
all-commits at lists.llvm.org
Thu Sep 19 02:18:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3d5e8e4693a51cd3ba336cec0c1a17fe389828a7
https://github.com/llvm/llvm-project/commit/3d5e8e4693a51cd3ba336cec0c1a17fe389828a7
Author: Daniil Kovalev <dkovalev at accesssoftek.com>
Date: 2024-09-19 (Thu, 19 Sep 2024)
Changed paths:
M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
M llvm/test/CodeGen/AArch64/ptrauth-call.ll
Log Message:
-----------
[PAC][CodeGen] Do not emit trivial 'mov xN, xN' on tail call (#109100)
Under some conditions, a trivial `mov xN xN` instruction was emitted on
tail calls. Consider the following code:
```
class Test {
public:
virtual void f() {}
};
void call_f(Test *t) {
t->f();
}
```
Correponding assembly:
```
_Z6call_fP4Test:
ldr x16, [x0]
mov x17, x0
movk x17, #6503, lsl #48
autda x16, x17
ldr x1, [x16]
=====> mov x16, x16
movk x16, #54167, lsl #48
braa x1, x16
```
This patch makes such movs being omitted.
Co-authored-by: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list