[Bug tree-optimization/96370] ICE with -ffast-math since r7-950-g8a85cee26eabf5cf

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 30 08:15:26 GMT 2020


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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so rewrite_expr_tree isn't prepared to see ops with a three component
"leaf" as try_special_add_to_ops produces which turns { -b, b } into
{ b, b, -1 }.  Instead it recurses into the apperant non-leaf _1 which
is the negate.

  /* Recurse on the LHS of the binary operator, which is guaranteed to
     be the non-leaf side.  */
  tree new_rhs1
    = rewrite_expr_tree (SSA_NAME_DEF_STMT (rhs1), opindex + 1, ops,
                         changed || oe->op != rhs2 || next_changed,
                         false);

But I have a simple fix.


More information about the Gcc-bugs mailing list