On 11/5/2021 4:19 AM, Andreas Krebbel via Gcc-patches wrote:
This prevents find_cond_trap from being invoked after reload. It may
generate compares which would require reloading.
Bootstrapped and regression tested on s390x.
Ok for mainline?
gcc/ChangeLog:
PR rtl-optimization/103028
* ifcvt.c (find_if_header): Invoke find_cond_trap only before
reload.
gcc/testsuite/ChangeLog:
PR rtl-optimization/103028
* gcc.dg/pr103028.c: New test.
Shouldn't this be handled by the target by rejecting creating the trap
after reload has completed since the target seems to need new pseudos to
generate a conditional trap? Otherwise we're penalizing targets which
don't need new pseudos to generate conditional traps.
jeff