PR middle-end/55114
* expr.h (maybe_emit_group_store): Declare.
* expr.c (maybe_emit_group_store): New function.
* builtins.c (expand_builtin_int_roundingfn): Call it.
(expand_builtin_int_roundingfn_2): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195060
138bc75d-0d04-0410-961f-
82ee72b054a4
+2013-01-09 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR middle-end/55114
+ * expr.h (maybe_emit_group_store): Declare.
+ * expr.c (maybe_emit_group_store): New function.
+ * builtins.c (expand_builtin_int_roundingfn): Call it.
+ (expand_builtin_int_roundingfn_2): Likewise.
+
2013-01-09 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/pr55829
exp = build_call_nofold_loc (EXPR_LOCATION (exp), fallback_fndecl, 1, arg);
tmp = expand_normal (exp);
+ tmp = maybe_emit_group_store (tmp, TREE_TYPE (exp));
/* Truncate the result of floating point optab to integer
via expand_fix (). */
fallback_fndecl, 1, arg);
target = expand_call (exp, NULL_RTX, target == const0_rtx);
+ target = maybe_emit_group_store (target, TREE_TYPE (exp));
return convert_to_mode (mode, target, 0);
}
emit_move_insn (orig_dst, dst);
}
+/* Return a form of X that does not use a PARALLEL. TYPE is the type
+ of the value stored in X. */
+
+rtx
+maybe_emit_group_store (rtx x, tree type)
+{
+ enum machine_mode mode = TYPE_MODE (type);
+ gcc_checking_assert (GET_MODE (x) == VOIDmode || GET_MODE (x) == mode);
+ if (GET_CODE (x) == PARALLEL)
+ {
+ rtx result = gen_reg_rtx (mode);
+ emit_group_store (result, x, type, int_size_in_bytes (type));
+ return result;
+ }
+ return x;
+}
+
/* Copy a BLKmode object of TYPE out of a register SRCREG into TARGET.
This is used on targets that return BLKmode values in registers. */
PARALLEL. */
extern void emit_group_store (rtx, rtx, tree, int);
+extern rtx maybe_emit_group_store (rtx, tree);
+
/* Copy BLKmode object from a set of registers. */
extern void copy_blkmode_from_reg (rtx, rtx, tree);