on 2023/11/28 15:05, Michael Meissner wrote: > I tried using this patch to compare with the vector size attribute patch I > posted. I could not build it as a cross compiler on my x86_64 because the > assembler gives the following error: > > Error: operand out of domain (11 is not a multiple of 2) for > std_stacktrace-elf.o. If you look at the assembler, it has combined a lxvp 11 > and lxvp 12 into: > > lxvp 11,0(9) > > The powerpc architecture requires that registers that are loaded with load > vector pair and stored with store vector point instructions only load/store > even/odd register pairs, and not odd/even pairs. Unfortunately, it will mean > that this optimization will match less often. >
Yes, the current implementation need some refinements, as comments in [1]: > Besides, it seems a bad idea to put this pass after reload? as register > allocation > finishes, this pairing has to be restricted by the reg No. (I didn't see any > checking on the reg No. relationship for paring btw.) > > Looking forward to the comments from Segher/David/Peter/Mike etc. I wonder if we should consider running such pass before reload instead. [1] https://gcc.gnu.org/pipermail/gcc-patches/2023-November/638070.html BR, Kewen