https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70960
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed, a latent issue also present on branches. ifcvt_walk_pattern_tree assumes SSA name 'var' but is called like 2496 case BIT_AND_EXPR: 2497 case BIT_IOR_EXPR: 2498 case BIT_XOR_EXPR: 2499 ifcvt_walk_pattern_tree (rhs1, defuse_list, def_stmt); 2500 rhs2 = gimple_assign_rhs2 (def_stmt); 2501 ifcvt_walk_pattern_tree (rhs2, defuse_list, def_stmt); 2502 break; where obviously at least rhs2 may be a constant. Though the IL looks fishy as well: powi_cond_75 = _110 & 1; powi_81 = powi_cond_75 ? -1.0e+0 : 1.0e+0; that powi_cond_75 doesn't look like a bool (_110 is int). "Obvious" patch: Index: gcc/tree-if-conv.c =================================================================== --- gcc/tree-if-conv.c (revision 235859) +++ gcc/tree-if-conv.c (working copy) @@ -2462,6 +2462,9 @@ ifcvt_walk_pattern_tree (tree var, vec<g enum tree_code code; gimple *def_stmt; + if (TREE_CODE (var) != SSA_NAME) + return; + def_stmt = SSA_NAME_DEF_STMT (var); if (gimple_code (def_stmt) != GIMPLE_ASSIGN) return;