X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftree-vect-patterns.c;h=c3f24a186f027852adf3f052e0fe47f82a08e43b;hb=fe10f73e500e04b2006cdcfd1349e93dfdcebd0e;hp=9c84d0a9a03dcd4b119399a2d8eab519ecf9d02b;hpb=bff7479cd1db6f81fbb20b39550136576d754523;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 9c84d0a9a03..c3f24a186f0 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -937,6 +937,11 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type, || TREE_CODE (const_oprnd) != INTEGER_CST) return false; + /* If oprnd has other uses besides that in stmt we cannot mark it + as being part of a pattern only. */ + if (!has_single_use (oprnd)) + return false; + /* If we are in the middle of a sequence, we use DEF from a previous statement. Otherwise, OPRND has to be a result of type promotion. */ if (*new_type)