https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116510
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2024-08-28 00:00:00 | Target Milestone|15.0 |12.5 Component|tree-optimization |c CC| |glisse at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Summary|[15 Regression] ice in |[12/13/14/15 Regression] |decompose, at |ice in decompose, at |wide-int.h:1049 |wide-int.h:1049 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. This is likely from a new match.pd pattern. * X == C (or X & Z == Y | C) is impossible if ~nonzero(X) & C != 0. */ (for cmp (eq ne) (simplify (cmp:c (with_possible_nonzero_bits2 @0) (with_certain_nonzero_bits2 @1)) (if (wi::bit_and_not (wi::to_wide (@1), get_nonzero_bits (@0)) != 0) { constant_boolean_node (cmp == NE_EXPR, type); }))) the issue is that with_possible_nonzero_bits2 also supports SSA_NAMEs, so @1 cannot be used like this. Caused by r8-910-g10bc8017a3028c - the pattern is quite old (and was broken). I would suggest (cmp (with_possible_nonzero_bits2 @0) INTEGER_CST@1) as "trivial" fix. The testcase exposes this only now.