diff options
author | Richard Biener <rguenther@suse.de> | 2019-05-16 08:03:49 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-05-16 08:03:49 +0000 |
commit | 1bf2a0b90f2457f6d9301535560eb5e05978261b (patch) | |
tree | bce84fa1f77945c69ed17cb17728304fec2ac700 /gcc/tree-cfg.c | |
parent | adfe6e4b2f8e7288710eac6bacd6bae8d6ea3c05 (diff) |
re PR target/90424 (memcpy into vector builtin not optimized)
2019-05-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/90424
* tree-ssa.c (non_rewritable_lvalue_p): Handle inserts from
aligned subvectors.
(execute_update_addresses_taken): Likewise.
* tree-cfg.c (verify_gimple_assign_ternary): Likewise.
* g++.target/i386/pr90424-1.C: New testcase.
* g++.target/i386/pr90424-2.C: Likewise.
From-SVN: r271279
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 966ce5a373c..c6a70c8f10b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4263,8 +4263,17 @@ verify_gimple_assign_ternary (gassign *stmt) } if (! ((INTEGRAL_TYPE_P (rhs1_type) && INTEGRAL_TYPE_P (rhs2_type)) + /* Vector element insert. */ || (VECTOR_TYPE_P (rhs1_type) - && types_compatible_p (TREE_TYPE (rhs1_type), rhs2_type)))) + && types_compatible_p (TREE_TYPE (rhs1_type), rhs2_type)) + /* Aligned sub-vector insert. */ + || (VECTOR_TYPE_P (rhs1_type) + && VECTOR_TYPE_P (rhs2_type) + && types_compatible_p (TREE_TYPE (rhs1_type), + TREE_TYPE (rhs2_type)) + && multiple_p (TYPE_VECTOR_SUBPARTS (rhs1_type), + TYPE_VECTOR_SUBPARTS (rhs2_type)) + && multiple_of_p (bitsizetype, rhs3, TYPE_SIZE (rhs2_type))))) { error ("not allowed type combination in BIT_INSERT_EXPR"); debug_generic_expr (rhs1_type); |