[Bug tree-optimization/126404] [16/17 Regression] ICE at -O2/3 on aarch64 during GIMPLE pass: vect

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 27 17:26:34 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126404

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so the issue is that we have 

 # _14 = PHI <_18, ..>
 _16 = __builtin_ctz (_14);
 _18 = (unsigned int) _16;

so we skip the conversion, but that has also been consumed by the pattern
which now has the reduction, and the next stmt is the PHI so we skip the
actual reduction stmt.

      if (CONVERT_EXPR_CODE_P (op.code)
          && tree_nop_conversion_p (op.type, TREE_TYPE (op.ops[0]))
          && (first
              || is_a <gphi *> (STMT_VINFO_STMT (next_stmt))))
        ;

Hmm.

I have a fix I think.


More information about the Gcc-bugs mailing list