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

"rguenth at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.