On Wed, Nov 13, 2019 at 02:21:01PM +0100, Bernd Schmidt wrote: > After the m68k cc0 conversion, there is one code quality regression that > I can see: we no longer generate autoinc addressing modes in > comparisons. This is because the parts of the compiler that generate > autoinc are unwilling to substitute into jumps. > > If you look at the code in reload, you'll see that it's careful around > jumps at find_reload time, and the code to perform autoinc reloads does > try to put all the extra code before the instruction. LRA seems to have > copied most of that code. > Also, in the former cc0 reality, a compare wasn't really any different > from a jump on m68k: we can't have a reload after the instruction in > either case. Any kind of move or arithmetic would clobber the flags. > > That leads me to believe that there is no issue with autoinc in jumps, > hence this patch. Bootstrapped and tested on the gcc135 machine > (powerpc64le-unknown-linux-gnu). I don't really expect this to get > approved; alternatively I could write some peepholes which would > generate the same code as long as register pressure doesn't get too high.
I don't see why it wouldn't work? If you apply it now we will still have a lot of time to find problems with it, if those exist. The combine parts are okay for trunk, if you keep an eye out :-) Segher