Commit d51ff7cb by Jim Wilson Committed by Jim Wilson

Fix IA-64 abort on testcase with switch statement that can be optimized away.

	* cse.c (cse_insn): Don't pass label subtraction to force_const_mem.

From-SVN: r35992
parent caa511fd
2000-08-25 Jim Wilson <wilson@cygnus.com>
* cse.c (cse_insn): Don't pass label subtraction to force_const_mem.
* function.c (gen_mem_addressof): Clear MEM_ALIAS_SET if no decl.
2000-08-25 Greg McGary <greg@mcgary.org>
......
......@@ -5328,8 +5328,16 @@ cse_insn (insn, libcall_insn)
else if (constant_pool_entries_cost
&& CONSTANT_P (trial)
/* Reject cases that will abort in decode_rtx_const.
On the alpha when simplifying a switch, we get
(const (truncate (minus (label_ref) (label_ref)))). */
&& ! (GET_CODE (trial) == CONST
&& GET_CODE (XEXP (trial, 0)) == TRUNCATE)
/* Likewise on IA-64, except without the truncate. */
&& ! (GET_CODE (trial) == CONST
&& GET_CODE (XEXP (trial, 0)) == MINUS
&& GET_CODE (XEXP (XEXP (trial, 0), 0)) == LABEL_REF
&& GET_CODE (XEXP (XEXP (trial, 0), 1)) == LABEL_REF)
&& (src_folded == 0
|| (GET_CODE (src_folded) != MEM
&& ! src_folded_force_flag))
......
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