Commit 972b320c by J"orn Rennecke Committed by Jeff Law

combine.c (combine_instructions): When finished, call init_recog.

8
	* combine.c (combine_instructions): When finished, call init_recog.
	* regmove.c (optimize_reg_copy_3): Reject volatile MEMs.

From-SVN: r23094
parent b1966eeb
...@@ -674,6 +674,9 @@ combine_instructions (f, nregs) ...@@ -674,6 +674,9 @@ combine_instructions (f, nregs)
total_successes += combine_successes; total_successes += combine_successes;
nonzero_sign_valid = 0; nonzero_sign_valid = 0;
/* Make recognizer allow volatile MEMs again. */
init_recog ();
} }
/* Wipe the reg_last_xxx arrays in preparation for another pass. */ /* Wipe the reg_last_xxx arrays in preparation for another pass. */
......
...@@ -553,6 +553,11 @@ optimize_reg_copy_3 (insn, dest, src) ...@@ -553,6 +553,11 @@ optimize_reg_copy_3 (insn, dest, src)
|| SET_DEST (set) != src_reg) || SET_DEST (set) != src_reg)
return; return;
/* Be conserative: although this optimization is also valid for
volatile memory references, that could cause trouble in later passes. */
if (MEM_VOLATILE_P (SET_SRC (set)))
return;
/* Do not use a SUBREG to truncate from one mode to another if truncation /* Do not use a SUBREG to truncate from one mode to another if truncation
is not a nop. */ is not a nop. */
if (GET_MODE_BITSIZE (GET_MODE (src_reg)) <= GET_MODE_BITSIZE (GET_MODE (src)) if (GET_MODE_BITSIZE (GET_MODE (src_reg)) <= GET_MODE_BITSIZE (GET_MODE (src))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment