> Am 19.09.2018 um 06:15 schrieb Jeff Law <l...@redhat.com>: > > On 9/18/18 8:04 AM, Segher Boessenkool wrote: >> On Wed, Sep 05, 2018 at 10:34:48AM +0200, Ilya Leoshkevich wrote: >>> S/390 epilogue ends with (parallel [(return) (use %r14)]) instead of >>> the more usual (return) or (simple_return). This sequence is not >>> recognized by the conditional return logic in try_optimize_cfg (). >> >> Why does it need this? Other targets with a link register make >> EPILOGUE_USES handle this. > I think because he's trying to optimize a conditional jump to a return > insn into a conditional return insn. I don't think we do that on other > targets, though I have pondered it from time to time. S/390 back-end already uses EPILOGUE_USES. The reason RETURN in PARALLEL still exists is that on older processors sequences using non-standard dynamically chosen link register are sometimes more efficient, and for such use cases EPILOGUE_USES doesn't work.
I talked to Ulrich Weigand about this yesterday, and he suggested to drop RETURN in PARALLEL for newer processors. I will give this a try, and if it works, middle-end changes in this patch will no longer be needed.