Yesterday's commit r15-1575-gea8061f46a301797e7ba33b52e3b4713fb8e6b48 "fwprop: invoke change_is_worthwhile to judge if a replacement is worthwhile" regresses GCN target (tested '-march=gfx908'): PASS: gcc.dg/hoist-register-pressure-1.c (test for excess errors) PASS: gcc.dg/hoist-register-pressure-2.c (test for excess errors) [-PASS:-]{+FAIL:+} gcc.dg/hoist-register-pressure-2.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" PASS: gcc.dg/hoist-register-pressure-3.c (test for excess errors) [-PASS:-]{+FAIL:+} gcc.dg/hoist-register-pressure-3.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" There is moderate code generation difference; I can't tell whether before vs. after is better. Does the compiler or the test cases or the compiler flags need to be adjusted? Re the latter, with '-fno-forward-propagate', we're back to PASSing.
The patch replaced rtx cost comparison with insn cost comparison. Some replacements can be done before but can't now. Or vice versa. Please check the fwprop dump log via -fdump-rtl-fwprop1-details and judge if the replacements are benefits or not.