diff options
author | Cong Hou <congh@google.com> | 2013-09-17 14:20:08 -0400 |
---|---|---|
committer | Cong Hou <congh@gcc.gnu.org> | 2013-09-17 14:20:08 -0400 |
commit | 181f5f3e3792f3724858e5552c6c9c87198bb6ba (patch) | |
tree | 75fd528e1e86e10788fa4a4a6e084044adeff15f /gcc/tree-vect-patterns.c | |
parent | 783f0cfc8d973c147a5243d7312b85e7ea892e1c (diff) | |
download | gcc-181f5f3e3792f3724858e5552c6c9c87198bb6ba.zip gcc-181f5f3e3792f3724858e5552c6c9c87198bb6ba.tar.gz gcc-181f5f3e3792f3724858e5552c6c9c87198bb6ba.tar.bz2 |
tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug when checking the dot production pattern.
2013-09-17 Cong Hou <congh@google.com>
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Fix a bug
when checking the dot production pattern. The type of rhs operand
of multiply is now checked correctly.
* gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
on two arrays with short and int types. This should not be recognized
as a dot product pattern.
From-SVN: r202663
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 3037252..0a4e812 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -397,7 +397,7 @@ vect_recog_dot_prod_pattern (vec<gimple> *stmts, tree *type_in, || !promotion) return NULL; oprnd00 = gimple_assign_rhs1 (def_stmt); - if (!type_conversion_p (oprnd0, stmt, true, &half_type1, &def_stmt, + if (!type_conversion_p (oprnd1, stmt, true, &half_type1, &def_stmt, &promotion) || !promotion) return NULL; |