bfin.c (legitimize_pic_address): Lose dead code that tests for CONSTANT_POOL_ADDRESS_P.

* config/bfin/bfin.c (legitimize_pic_address): Lose dead code
	that tests for CONSTANT_POOL_ADDRESS_P.

From-SVN: r118854
This commit is contained in:
Bernd Schmidt 2006-11-15 12:27:32 +00:00 committed by Bernd Schmidt
parent 0f14009a1e
commit 6b97a43964
2 changed files with 21 additions and 27 deletions

View File

@ -2,6 +2,9 @@
* tree-ssa-loop-ivopts.c (determine_iv_costs): Fix formatting.
* config/bfin/bfin.c (legitimize_pic_address): Lose dead code
that tests for CONSTANT_POOL_ADDRESS_P.
2006-11-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/29581

View File

@ -145,36 +145,27 @@ legitimize_pic_address (rtx orig, rtx reg, rtx picreg)
if (GET_CODE (addr) == SYMBOL_REF || GET_CODE (addr) == LABEL_REF)
{
if (GET_CODE (addr) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (addr))
reg = new = orig;
int unspec;
rtx tmp;
if (TARGET_ID_SHARED_LIBRARY)
unspec = UNSPEC_MOVE_PIC;
else if (GET_CODE (addr) == SYMBOL_REF
&& SYMBOL_REF_FUNCTION_P (addr))
unspec = UNSPEC_FUNCDESC_GOT17M4;
else
unspec = UNSPEC_MOVE_FDPIC;
if (reg == 0)
{
int unspec;
rtx tmp;
if (TARGET_ID_SHARED_LIBRARY)
unspec = UNSPEC_MOVE_PIC;
else if (GET_CODE (addr) == SYMBOL_REF
&& SYMBOL_REF_FUNCTION_P (addr))
{
unspec = UNSPEC_FUNCDESC_GOT17M4;
}
else
{
unspec = UNSPEC_MOVE_FDPIC;
}
if (reg == 0)
{
gcc_assert (!no_new_pseudos);
reg = gen_reg_rtx (Pmode);
}
tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), unspec);
new = gen_const_mem (Pmode, gen_rtx_PLUS (Pmode, picreg, tmp));
emit_move_insn (reg, new);
gcc_assert (!no_new_pseudos);
reg = gen_reg_rtx (Pmode);
}
tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), unspec);
new = gen_const_mem (Pmode, gen_rtx_PLUS (Pmode, picreg, tmp));
emit_move_insn (reg, new);
if (picreg == pic_offset_table_rtx)
current_function_uses_pic_offset_table = 1;
return reg;