> Date: Fri, 1 Dec 2023 08:09:08 -0700 > From: Jeff Law <jeffreya...@gmail.com>
> On 11/30/23 18:08, Hans-Peter Nilsson wrote: > >> Date: Sun, 19 Nov 2023 17:47:56 -0700 > >> From: Jeff Law <j...@ventanamicro.com> > > > >> Locally we have had this enabled at -O1 and above to encourage testing, > >> but I'm thinking that for the trunk enabling at -O2 and above is the > >> right thing to do. > > > > Yes. > > > >> Thoughts, comments, recommendations? > > > > Sounds great! > > > > It'd be nice if its framework can be re-used for > > target-specific passes, doing quirky sign- or zero-extend- > > related optimizations (those that are not just sign- or > > zero-extend removal). Perhaps most of those opportunities > > can be implemented as target hooks in this pass. Definitely > > not asking for a change, just imagining future improvements. > > > > Also, I haven't followed the thread and its branches, just > > offering a word encouragement. > What kind of quirky target things did you have in mind? If there's > overlap with things we need I might be able to find someone to take it > on. Or might be able to suggest how they can be handled. Sorry, I was hoping I'd not need to substantiate that part outside the "not just sign- or zero-extend removal". :) But perhaps: somewhat trivial would be where the sign/zero-extension is hidden in an unspec, so the target needs to be consulted regarding possible elimination and how to do it. If that doesn't do it, just ignore that part of the comment. I have nothing substantial besides this pass sounding like it'd be a great stepping-stone. I'm having trouble making up hypothetical cases here, and it probably wouldn't help. I hope I'll find time to try the latest version but definitely no promises. brgds, H-P