tree src_type = TREE_TYPE (orig[0]);
if (!useless_type_conversion_p (type, src_type))
{
- gcc_assert (!targetm.compatible_vector_types_p (type, src_type));
+ gcc_assert (known_eq (TYPE_VECTOR_SUBPARTS (type),
+ TYPE_VECTOR_SUBPARTS (src_type))
+ && useless_type_conversion_p (TREE_TYPE (type),
+ TREE_TYPE (src_type)));
tree rhs = build1 (VIEW_CONVERT_EXPR, type, orig[0]);
orig[0] = make_ssa_name (type);
gassign *assign = gimple_build_assign (orig[0], rhs);
res = gimple_build (&stmts, conv_code, type, res);
else if (!useless_type_conversion_p (type, TREE_TYPE (res)))
{
- gcc_assert (!targetm.compatible_vector_types_p (type, perm_type));
+ gcc_assert (known_eq (TYPE_VECTOR_SUBPARTS (type),
+ TYPE_VECTOR_SUBPARTS (perm_type))
+ && useless_type_conversion_p (TREE_TYPE (type),
+ TREE_TYPE (perm_type)));
res = gimple_build (&stmts, VIEW_CONVERT_EXPR, type, res);
}
/* Blend in the actual constant. */
/* If this statement sets an SSA_NAME to an address,
try to propagate the address into the uses of the SSA_NAME. */
- if (code == ADDR_EXPR
- /* Handle pointer conversions on invariant addresses
- as well, as this is valid gimple. */
- || (CONVERT_EXPR_CODE_P (code)
- && TREE_CODE (rhs) == ADDR_EXPR
- && POINTER_TYPE_P (TREE_TYPE (lhs))))
+ if ((code == ADDR_EXPR
+ /* Handle pointer conversions on invariant addresses
+ as well, as this is valid gimple. */
+ || (CONVERT_EXPR_CODE_P (code)
+ && TREE_CODE (rhs) == ADDR_EXPR
+ && POINTER_TYPE_P (TREE_TYPE (lhs))))
+ && TREE_CODE (TREE_OPERAND (rhs, 0)) != TARGET_MEM_REF)
{
tree base = get_base_address (TREE_OPERAND (rhs, 0));
if ((!base
|| !DECL_P (base)
|| decl_address_invariant_p (base))
- && TREE_CODE (base) != TARGET_MEM_REF
&& !stmt_references_abnormal_ssa_name (stmt)
&& forward_propagate_addr_expr (lhs, rhs, true))
{
!= TARGET_MEM_REF))
{
tree use_lhs = gimple_assign_lhs (use_stmt);
+ if (auto_var_p (use_lhs))
+ DECL_NOT_GIMPLE_REG_P (use_lhs) = 1;
tree new_lhs = build1 (REALPART_EXPR,
TREE_TYPE (TREE_TYPE (use_lhs)),
unshare_expr (use_lhs));
= tree_to_uhwi (TYPE_SIZE (elt_t));
unsigned HOST_WIDE_INT n
= tree_to_uhwi (TYPE_SIZE (TREE_TYPE (rhs)));
+ tree use_lhs = gimple_assign_lhs (use_stmt);
+ if (auto_var_p (use_lhs))
+ DECL_NOT_GIMPLE_REG_P (use_lhs) = 1;
for (unsigned HOST_WIDE_INT bi = 0; bi < n; bi += elt_w)
{
unsigned HOST_WIDE_INT ci = bi / elt_w;
new_rhs = CONSTRUCTOR_ELT (rhs, ci)->value;
else
new_rhs = build_zero_cst (elt_t);
- tree use_lhs = gimple_assign_lhs (use_stmt);
tree new_lhs = build3 (BIT_FIELD_REF,
elt_t,
unshare_expr (use_lhs),