Re: [PATCH] Fold truncations of left shifts in match.pd

2022-06-02 Thread Richard Biener via Gcc-patches
On Thu, Jun 2, 2022 at 12:55 PM Roger Sayle wrote: > > > Hi Richard, > > + /* RTL expansion knows how to expand rotates using shift/or. */ if > > + (icode == CODE_FOR_nothing > > + && (code == LROTATE_EXPR || code == RROTATE_EXPR) > > + && optab_handler (ior_optab, vec_mode) != CODE_F

RE: [PATCH] Fold truncations of left shifts in match.pd

2022-06-02 Thread Roger Sayle
Hi Richard, > + /* RTL expansion knows how to expand rotates using shift/or. */ if > + (icode == CODE_FOR_nothing > + && (code == LROTATE_EXPR || code == RROTATE_EXPR) > + && optab_handler (ior_optab, vec_mode) != CODE_FOR_nothing > + && optab_handler (ashl_optab, vec_mode) != C

Re: [PATCH] Fold truncations of left shifts in match.pd

2022-06-02 Thread Richard Biener via Gcc-patches
On Mon, May 30, 2022 at 2:24 PM Roger Sayle wrote: > > > Whilst investigating PR 55278, I noticed that the tree-ssa optimizers > aren't eliminating the promotions of shifts to "int" as inserted by the > c-family front-ends, instead leaving this simplification to be left to > the RTL optimizers. T

Re: [PATCH] Fold truncations of left shifts in match.pd

2022-06-01 Thread Jeff Law via Gcc-patches
On 5/30/2022 6:23 AM, Roger Sayle wrote: Whilst investigating PR 55278, I noticed that the tree-ssa optimizers aren't eliminating the promotions of shifts to "int" as inserted by the c-family front-ends, instead leaving this simplification to be left to the RTL optimizers. This patch allows m