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

2022-10-21 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi Richard, > >> Can you do the aarch64_mov_imm changes as a separate patch? It's difficult >> to review the two changes folded together like this. > > Sure, I'll send a separate patch. So here is version 2 again: I still think we should move the functions to avoid the f

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

2022-10-20 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > Can you do the aarch64_mov_imm changes as a separate patch?  It's difficult > to review the two changes folded together like this. Sure, I'll send a separate patch. So here is version 2 again: [PATCH v2][AArch64] Improve immediate expansion [PR106583] Improve immediate expansion o

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

2022-10-20 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > ping > > > > Hi Richard, > Sounds good, but could you put it before the mode version, to avoid the forward declaration? >>> >>> I can swap them around but the forward declaration is still required as >>> aarch64_check_bitmask is 5000 lines before aarch64_bitmask_

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

2022-10-19 Thread Wilco Dijkstra via Gcc-patches
ping Hi Richard, >>> Sounds good, but could you put it before the mode version, >>> to avoid the forward declaration? >> >> I can swap them around but the forward declaration is still required as >> aarch64_check_bitmask is 5000 lines before aarch64_bitmask_imm. > > OK, how about moving them bo

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

2022-10-12 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, >>> Sounds good, but could you put it before the mode version, >>> to avoid the forward declaration? >> >> I can swap them around but the forward declaration is still required as >> aarch64_check_bitmask is 5000 lines before aarch64_bitmask_imm. > > OK, how about moving them both above

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

2022-10-07 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi Richard, > >>> Yes, with a more general search loop we can get that case too - >>> it doesn't trigger much though. The code that checks for this is >>> now refactored into a new function. Given there are now many >>> more calls to aarch64_bitmask_imm, I added a streamli

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

2022-10-07 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, >> Yes, with a more general search loop we can get that case too - >> it doesn't trigger much though. The code that checks for this is >> now refactored into a new function. Given there are now many >> more calls to aarch64_bitmask_imm, I added a streamlined internal >> entry point tha

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

2022-10-07 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra via Gcc-patches writes: > Hi Richard, > >> Did you consider handling the case where the movks aren't for >> consecutive bitranges?  E.g. the patch handles: > >> but it looks like it would be fairly easy to extend it to: >> >>  0x12345678 > > Yes, with a more general search l

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

2022-10-06 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > Did you consider handling the case where the movks aren't for > consecutive bitranges?  E.g. the patch handles: > but it looks like it would be fairly easy to extend it to: > >  0x12345678 Yes, with a more general search loop we can get that case too - it doesn't trigger mu

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

2022-10-05 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Improve immediate expansion of immediates which can be created from a > bitmask immediate and 2 MOVKs. This reduces the number of 4-instruction > immediates in SPECINT/FP by 10-15%. > > Passes regress, OK for commit? > > gcc/ChangeLog: > > PR target/106583 >

[PATCH][AArch64] Improve immediate expansion [PR106583]

2022-10-04 Thread Wilco Dijkstra via Gcc-patches
Improve immediate expansion of immediates which can be created from a bitmask immediate and 2 MOVKs. This reduces the number of 4-instruction immediates in SPECINT/FP by 10-15%. Passes regress, OK for commit? gcc/ChangeLog: PR target/106583 * config/aarch64/aarch64.cc (aarch64_i