which moves the outer @code{plus} operation to the inner arms
of the @code{vec_cond} expression but only if the actual plus
-operations both simplify. Note this is currently only supported
-for code generation targeting @code{GIMPLE}.
+operations both simplify. Note that on @code{GENERIC} a simple
+operand means that the result satisfies @code{!EXPR_P} which
+can be limiting if the operation itself simplifies but the
+remaining operand is an (unrelated) expression.
As intermediate conversions are often optional there is a way to
avoid the need to repeat patterns both with and without such
fprintf_indent (f, indent, "_r%d = fold_build%d_loc (loc, %s, %s",
depth, ops.length(), opr_name, type);
else
- {
- fprintf_indent (f, indent, "{\n");
- fprintf_indent (f, indent, " _r%d = maybe_build_call_expr_loc (loc, "
- "%s, %s, %d", depth, opr_name, type, ops.length());
- }
+ fprintf_indent (f, indent, "_r%d = maybe_build_call_expr_loc (loc, "
+ "%s, %s, %d", depth, opr_name, type, ops.length());
for (unsigned i = 0; i < ops.length (); ++i)
fprintf (f, ", _o%d[%u]", depth, i);
fprintf (f, ");\n");
if (opr->kind != id_base::CODE)
{
- fprintf_indent (f, indent, " if (!_r%d)\n", depth);
- fprintf_indent (f, indent, " goto %s;\n", fail_label);
- fprintf_indent (f, indent, "}\n");
+ fprintf_indent (f, indent, "if (!_r%d)\n", depth);
+ fprintf_indent (f, indent, " goto %s;\n", fail_label);
+ }
+ if (force_leaf)
+ {
+ fprintf_indent (f, indent, "if (EXPR_P (_r%d))\n", depth);
+ fprintf_indent (f, indent, " goto %s;\n", fail_label);
}
if (*opr == CONVERT_EXPR)
{
&& token->type == CPP_NOT
&& !(token->flags & PREV_WHITE))
{
- if (!gimple)
- fatal_at (token, "forcing simplification to a leaf is not supported "
- "for GENERIC");
eat_token (CPP_NOT);
e->force_leaf = true;
}