aboutsummaryrefslogtreecommitdiff
path: root/gcc/ree.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>2014-06-13 10:40:48 -0600
committerJeff Law <law@gcc.gnu.org>2014-06-13 10:40:48 -0600
commitc7ece684cada075bf1d46669794217ccd4bf8b3d (patch)
treed09156de34041a750c751b23d0bbc0f8a19489ec /gcc/ree.c
parent8e96d784335afc41a647ccd108dbdc7961b06da9 (diff)
downloadgcc-c7ece684cada075bf1d46669794217ccd4bf8b3d.zip
gcc-c7ece684cada075bf1d46669794217ccd4bf8b3d.tar.gz
gcc-c7ece684cada075bf1d46669794217ccd4bf8b3d.tar.bz2
[multiple changes]
2014-06-13 Jeff Law <law@redhat.com> PR rtl-optimization/61094 PR rtl-optimization/61446 * ree.c (combine_reaching_defs): Get the mode for the copy from the extension insn rather than the defining insn. 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com> PR rtl-optimization/61094 PR rtl-optimization/61446 * gcc.target/i386/pr61446.c : New. From-SVN: r211649
Diffstat (limited to 'gcc/ree.c')
-rw-r--r--gcc/ree.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ree.c b/gcc/ree.c
index ade413e..f4bb4cc 100644
--- a/gcc/ree.c
+++ b/gcc/ree.c
@@ -787,13 +787,16 @@ combine_reaching_defs (ext_cand *cand, const_rtx set_pat, ext_state *state)
generated more than one insn.
This generates garbage since we throw away the insn when we're
- done, only to recreate it later if this test was successful. */
+ done, only to recreate it later if this test was successful.
+
+ Make sure to get the mode from the extension (cand->insn). This
+ is different than in the code to emit the copy as we have not
+ modified the defining insn yet. */
start_sequence ();
- rtx sub_rtx = *get_sub_rtx (def_insn);
rtx pat = PATTERN (cand->insn);
- rtx new_dst = gen_rtx_REG (GET_MODE (SET_DEST (sub_rtx)),
+ rtx new_dst = gen_rtx_REG (GET_MODE (SET_DEST (pat)),
REGNO (XEXP (SET_SRC (pat), 0)));
- rtx new_src = gen_rtx_REG (GET_MODE (SET_DEST (sub_rtx)),
+ rtx new_src = gen_rtx_REG (GET_MODE (SET_DEST (pat)),
REGNO (SET_DEST (pat)));
emit_move_insn (new_dst, new_src);