On 28/08/2020 11:00, Richard Sandiford wrote: > Alex Coplan <alex.cop...@arm.com> writes: > > Hello, > > > > Following on from the earlier patch to fix up the syntax for > > add/sub/adds/subs and friends with a sign/zero-extended operand [0], > > this patch removes the "mult" variants of these patterns which are > > all redundant. > > > > This patch removes the following patterns from the AArch64 backend: > > > > *adds_mul_imm_<mode> > > *subs_mul_imm_<mode> > > *adds_<optab><mode>_multp2 > > *subs_<optab><mode>_multp2 > > *add_mul_imm_<mode> > > *add_<optab><ALLX:mode>_mult_<GPI:mode> > > *add_<optab><SHORT:mode>_mult_si_uxtw > > *add_<optab><mode>_multp2 > > *add_<optab>si_multp2_uxtw > > *add_uxt<mode>_multp2 > > *add_uxtsi_multp2_uxtw > > *sub_mul_imm_<mode> > > *sub_mul_imm_si_uxtw > > *sub_<optab><mode>_multp2 > > *sub_<optab>si_multp2_uxtw > > *sub_uxt<mode>_multp2 > > *sub_uxtsi_multp2_uxtw > > *neg_mul_imm_<mode>2 > > *neg_mul_imm_si2_uxtw > > > > Together with the following predicates which were used only by these > > patterns: > > > > - aarch64_pwr_imm3 > > - aarch64_pwr_2_si > > - aarch64_pwr_2_di > > > > These patterns are all redundant since multiplications by powers of two > > should be represented as shfits outside a (mem). > > > > Testing: > > * Bootstrapped and regtested on aarch64-none-linux-gnu (on top of [0]), > > no regressions. > > > > OK for master (when applied after [0])? > > That's a nice collection of minuses. > > OK for trunk, thanks. Since this depends on the RA patch, and since > RA patches have a habit of exposing problems on other targets, it might > be better to wait for a week or so before committing this one. > Just a suggestion though -- go ahead and commit whenever you're > comfortable committing.
Pushed to trunk, together with the previous patch to fix the sign/zero-extend syntax: 2f8ae301f6a aarch64: Remove redundant mult patterns d4febc75e8d aarch64: Don't emit invalid zero/sign-extend syntax Thanks, Alex > > The patch might expose code quality regressions. If so, that's > probably a sign that some other pass needs a similar fix to the RA, > even though the symptom is “just” a missed optimisation rather than > an ICE. > > Thanks, > Richard