https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127039
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-08-24
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. We cycle:
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
Applying pattern match.pd:12287, gimple-match-8.cc:2421
Applying pattern match.pd:12252, gimple-match-4.cc:12809
...
Aborting expression simplification due to deep recursion
Aborting expression simplification due to deep recursion
Aborting expression simplification due to deep recursion
Aborting expression simplification due to deep recursion
and then exponentially apply this to all dead(?) generated stmts.
The earlier pattern is suspicious:
(for reduc (IFN_REDUC_PLUS IFN_REDUC_MAX IFN_REDUC_MIN IFN_REDUC_FMAX
IFN_REDUC_FMIN IFN_REDUC_AND IFN_REDUC_IOR IFN_REDUC_XOR)
op (plus max min IFN_FMAX IFN_FMIN bit_and bit_ior bit_xor)
(simplify (reduc (op @0 VECTOR_CST@1))
(op (reduc:type @0) (reduc:type @1))))
it possibly misses a ! on the 2nd reduc operation since we generate:
_62 = .REDUC_MIN ({ 0, ... });
which is unfolded. So improving constant folding would help, too.