Re: [PATCH] LoongArch: Add a dedicated pattern for bitwise + alsl

2025-03-07 Thread Lulu Cheng
LGTM, but since we're now in stage 4, I believe it should be merged into GCC16 Stage 1. Thanks! 在 2025/3/1 上午11:38, Xi Ruoyao 写道: We've implemented the slli + bitwise => bitwise + slli reassociation in r15-7062. I'd hoped late combine could handle slli.d + bitwise + add.d => bitwise + slli.d

[PATCH] LoongArch: Add a dedicated pattern for bitwise + alsl

2025-02-28 Thread Xi Ruoyao
We've implemented the slli + bitwise => bitwise + slli reassociation in r15-7062. I'd hoped late combine could handle slli.d + bitwise + add.d => bitwise + slli.d + add.d => bitwise => alsl.d, but it does not always work, for example a |= 0xfff; b |= 0xfff; a <<= 2; b <<= 2; a += x; b