From 1bf2a0b90f2457f6d9301535560eb5e05978261b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 16 May 2019 08:03:49 +0000 Subject: re PR target/90424 (memcpy into vector builtin not optimized) 2019-05-16 Richard Biener 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 --- gcc/tree-cfg.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/tree-cfg.c') 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); -- cgit v1.2.3