This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/69328] [6 Regression] ice in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1379 with -O3
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 18 Jan 2016 12:28:09 +0000
- Subject: [Bug tree-optimization/69328] [6 Regression] ice in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1379 with -O3
- Auto-submitted: auto-generated
- References: <bug-69328-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69328
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
1378 is_simple_use = vect_is_simple_use (op, loop_vinfo, &def_stmt, &dt);
1379 gcc_assert (is_simple_use);
(gdb) p op
$2 = <ne_expr 0x7ffff69c4cf8>
ehm.
if (masked)
{
vec_cond_lhs
= vect_get_vec_def_for_operand (cond_expr, stmt,
comp_vectype);
vect_is_simple_use (cond_expr, stmt_info->vinfo,
>emp, &dts[0]);
}
else
{
vec_cond_lhs =
vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 0),
stmt, comp_vectype);
vect_is_simple_use (TREE_OPERAND (cond_expr, 0),
loop_vinfo, >emp, &dts[0]);
vec_cond_rhs =
vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 1),
stmt, comp_vectype);
vect_is_simple_use (TREE_OPERAND (cond_expr, 1),
loop_vinfo, >emp, &dts[1]);
}
Probably better test ! COMPARISON_CLASS_P (cond_expr) here. OTOH we have
if (VECTOR_BOOLEAN_TYPE_P (comp_vectype))
{
vec_cmp_type = comp_vectype;
masked = true;
}
else
vec_cmp_type = build_same_sized_truth_vector_type (comp_vectype);
not sure why that's specially only for boolean vector types. So
@@ -7544,11 +7545,9 @@ vectorizable_condition (gimple *stmt, gi
if (!vect_is_simple_use (else_clause, stmt_info->vinfo, &def_stmt, &dt))
return false;
+ bool masked = ! COMPARISON_CLASS_P (cond_expr);
if (VECTOR_BOOLEAN_TYPE_P (comp_vectype))
- {
- vec_cmp_type = comp_vectype;
- masked = true;
- }
+ vec_cmp_type = comp_vectype;
else
vec_cmp_type = build_same_sized_truth_vector_type (comp_vectype);
if (vec_cmp_type == NULL_TREE)
but that later ICEs then with
> ./cc1 -quiet t.c -O3
t.c: In function âfn1â:
t.c:2:6: internal compiler error: in vector_compare_rtx, at optabs.c:5290
void fn1() {
^~~
0xca84f2 vector_compare_rtx
/space/rguenther/src/svn/trunk3/gcc/optabs.c:5290
0xca979f expand_vec_cond_expr(tree_node*, tree_node*, tree_node*, tree_node*,
rtx_def*)
/space/rguenther/src/svn/trunk3/gcc/optabs.c:5612
sth else is wrong here.