Re: [PATCH] AArch64: Improve immediate expansion [PR105928]

2023-09-19 Thread Wilco Dijkstra
Hi Richard, >> Note that aarch64_internal_mov_immediate may be called after reload, >> so it would end up even more complex. > > The sequence I quoted was supposed to work before and after reload.  The: > >    rtx tmp = aarch64_target_reg (dest, DImode); > > would create a fresh

Re: [PATCH] AArch64: Improve immediate expansion [PR105928]

2023-09-19 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >> I was worried that reusing "dest" for intermediate results would >> prevent CSE for cases like: >> >> void g (long long, long long); >> void >> f (long long *ptr) >> { >> g (0xee11ee22ee11ee22LL, 0xdc23dc44ee11ee22LL); >> } > > Note that

Re: [PATCH] AArch64: Improve immediate expansion [PR105928]

2023-09-18 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > I was worried that reusing "dest" for intermediate results would > prevent CSE for cases like: > > void g (long long, long long); > void > f (long long *ptr) > { >   g (0xee11ee22ee11ee22LL, 0xdc23dc44ee11ee22LL); > } Note that aarch64_internal_mov_immediate may be called after

Re: [PATCH] AArch64: Improve immediate expansion [PR105928]

2023-09-17 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Support immediate expansion of immediates which can be created from 2 MOVKs > and a shifted ORR or BIC instruction. Change aarch64_split_dimode_const_store > to apply if we save one instruction. > > This reduces the number of 4-instruction immediates in SPECINT/FP by 5%.

[PATCH] AArch64: Improve immediate expansion [PR105928]

2023-09-14 Thread Wilco Dijkstra via Gcc-patches
Support immediate expansion of immediates which can be created from 2 MOVKs and a shifted ORR or BIC instruction. Change aarch64_split_dimode_const_store to apply if we save one instruction. This reduces the number of 4-instruction immediates in SPECINT/FP by 5%. Passes regress, OK for commit?