On 2/5/2026 1:15 PM, Roger Sayle wrote:
Thanks again to Jeff Law and Andrew Pinski. Here's a revised patch that
addresses the true underlying cause of PR 128333. recog.cc's cancel_changes
was not correctly updating the recog_data cache, which leads to strange
(incorrect) behavior in fwprop and ifcvt.
This patch has been tested on x86_64-pc-linux-gnu with make bootstrap
and make -k check, both with and without --target_board=unix{-m32},
with no new failures. Ok for mainline?
2026-02-05 Roger Sayle <[email protected]>
Andrew Pinski <[email protected]>
Jeff Law <[email protected]>
gcc/ChangeLog
PR rtl-optimization/123833
* recog.cc (cancel_changes): Update the recog_data cache if it
holds the instruction being changed.
gcc/testsuite
PR rtl-optimization/123833
* gcc.target/mips/pr123833.c: New test case.
OK. While I worry slightly about the need to possibly invalidate the
cache in more cases, this is clearly an improvement.
Jeff