https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113281
--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to rguent...@suse.de from comment #16) > On Wed, 24 Jan 2024, pinskia at gcc dot gnu.org wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113281 > > > > --- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > > (In reply to Richard Biener from comment #14) > > > a >= 16 ? 0 : 32872 >> MIN (a, 15) (the MIN is still required to > > > avoid requiring masking). > > > > Note maybe instead of MIN here we use `a & 0xf` since that will more likely > > be > > cheaper than a MIN. > > But it's incorrect (that's what I did originally). But `(a>= 16)? 0: (32872>> (a&0xf))` is correct. So is `(a>=16 ? 0 : 32872) >> ( a & 0xf)` . Or is it you want to avoid the conditional here.