diff options
author | Richard Biener <rguenther@suse.de> | 2016-10-04 13:40:54 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-10-04 13:40:54 +0000 |
commit | 078b5aab3875630d6b09cac4ea4408ef9ba04a00 (patch) | |
tree | 6da5e3efce3d661a41278d83f6d0ec832011bd12 /gcc/tree-ssa-forwprop.c | |
parent | 2b5688997f2bfc90fa512f0bb2d010bf8d7a85b6 (diff) | |
download | gcc-078b5aab3875630d6b09cac4ea4408ef9ba04a00.zip gcc-078b5aab3875630d6b09cac4ea4408ef9ba04a00.tar.gz gcc-078b5aab3875630d6b09cac4ea4408ef9ba04a00.tar.bz2 |
re PR tree-optimization/77399 (Poor code generation for vector casts and loads)
2016-10-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/77399
* tree-ssa-forwprop.c (simplify_vector_constructor): Properly
verify the target can convert.
* gcc.dg/tree-ssa/forwprop-35.c: Adjust.
From-SVN: r240744
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index cd066ef..ed11b32 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see #include "builtins.h" #include "tree-cfgcleanup.h" #include "cfganal.h" +#include "optabs-tree.h" /* This pass propagates the RHS of assignment statements into use sites of the LHS of the assignment. It's basically a specialized @@ -2037,6 +2038,13 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi) != TYPE_VECTOR_SUBPARTS (TREE_TYPE (orig)))) return false; + tree tem; + if (conv_code != ERROR_MARK + && (! supportable_convert_operation (conv_code, type, TREE_TYPE (orig), + &tem, &conv_code) + || conv_code == CALL_EXPR)) + return false; + if (maybe_ident) { if (conv_code == ERROR_MARK) |