Commit 56f8faae by Cong Hou Committed by Cong Hou

re PR tree-optimization/60896 (ICE: in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1449)

2014-04-24  Cong Hou  <congh@google.com>

    PR tree-optimization/60896
    * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Pick up
    all statements in PATTERN_DEF_SEQ in recognized widen-mult pattern.
    (vect_mark_pattern_stmts): Set the def type of all statements in
    PATTERN_DEF_SEQ as vect_internal_def.

2014-04-24  Cong Hou  <congh@google.com>

    PR tree-optimization/60896
    * g++.dg/vect/pr60896.cc: New test.

From-SVN: r209773
parent 9beb6f2b
2014-04-24 Cong Hou <congh@google.com>
PR tree-optimization/60896
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Pick up
all statements in PATTERN_DEF_SEQ in recognized widen-mult pattern.
(vect_mark_pattern_stmts): Set the def type of all statements in
PATTERN_DEF_SEQ as vect_internal_def.
2014-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
* doc/extend.texi (PowerPC Built-in Functions): Document new
......
2014-04-24 Cong Hou <congh@google.com>
PR tree-optimization/60896
* g++.dg/vect/pr60896.cc: New test.
2014-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/pack01.c: New test to test the new pack and
......
/* { dg-do compile } */
/* { dg-options "-O3" } */
struct A
{
int m_fn1 ();
short *m_fn2 ();
};
struct B
{
void *fC;
};
int a, b;
unsigned char i;
void fn1 (unsigned char *p1, A &p2)
{
int c = p2.m_fn1 ();
for (int d = 0; c; d++)
{
short *e = p2.m_fn2 ();
unsigned char *f = &p1[0];
for (int g = 0; g < a; g++)
{
int h = e[0];
b += h * f[g];
}
}
}
void fn2 (A &p1, A &p2, B &p3)
{
int j = p2.m_fn1 ();
for (int k = 0; j; k++)
if (0)
;
else
fn1 (&i, p1);
if (p3.fC)
;
else
;
}
......@@ -392,6 +392,8 @@ vect_recog_dot_prod_pattern (vec<gimple> *stmts, tree *type_in,
gcc_assert (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_internal_def);
oprnd00 = gimple_assign_rhs1 (stmt);
oprnd01 = gimple_assign_rhs2 (stmt);
STMT_VINFO_PATTERN_DEF_SEQ (vinfo_for_stmt (last_stmt))
= STMT_VINFO_PATTERN_DEF_SEQ (stmt_vinfo);
}
else
{
......@@ -3065,8 +3067,7 @@ vect_mark_pattern_stmts (gimple orig_stmt, gimple pattern_stmt,
}
gimple_set_bb (def_stmt, gimple_bb (orig_stmt));
STMT_VINFO_RELATED_STMT (def_stmt_info) = orig_stmt;
STMT_VINFO_DEF_TYPE (def_stmt_info)
= STMT_VINFO_DEF_TYPE (orig_stmt_info);
STMT_VINFO_DEF_TYPE (def_stmt_info) = vect_internal_def;
if (STMT_VINFO_VECTYPE (def_stmt_info) == NULL_TREE)
STMT_VINFO_VECTYPE (def_stmt_info) = pattern_vectype;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment