llvm-project
3d5e8e46 - [PAC][CodeGen] Do not emit trivial 'mov xN, xN' on tail call (#109100)

Commit
1 year ago
[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@accesssoftek.com>
Author
Parents
Loading