New define_splits to recombine output from LEGITIMIZE_ADDRESS.
From-SVN: r12729
This commit is contained in:
parent
1bdf86c3ba
commit
653bd7a660
@ -1709,6 +1709,61 @@
|
||||
FAIL;
|
||||
}")
|
||||
|
||||
;; If a base address generated by LEGITIMIZE_ADDRESS for SImode is
|
||||
;; used only once, let combine add in the index again.
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:SI 0 "register_operand" "")
|
||||
(match_operand:SI 1 "" ""))
|
||||
(clobber (match_operand 2 "register_operand" ""))]
|
||||
"! reload_in_progress && ! reload_completed"
|
||||
[(use (reg:SI 0))]
|
||||
"
|
||||
{
|
||||
rtx addr, reg, const_int;
|
||||
|
||||
if (GET_CODE (operands[1]) != MEM)
|
||||
FAIL;
|
||||
addr = XEXP (operands[1], 0);
|
||||
if (GET_CODE (addr) != PLUS)
|
||||
FAIL;
|
||||
reg = XEXP (addr, 0);
|
||||
const_int = XEXP (addr, 1);
|
||||
if (GET_CODE (reg) != REG || GET_CODE (const_int) != CONST_INT)
|
||||
FAIL;
|
||||
emit_move_insn (operands[2], const_int);
|
||||
emit_move_insn (operands[0],
|
||||
change_address (operands[1], VOIDmode,
|
||||
gen_rtx (PLUS, SImode, reg, operands[2])));
|
||||
DONE;
|
||||
}")
|
||||
|
||||
(define_split
|
||||
[(set (match_operand:SI 1 "" "")
|
||||
(match_operand:SI 0 "register_operand" ""))
|
||||
(clobber (match_operand 2 "register_operand" ""))]
|
||||
"! reload_in_progress && ! reload_completed"
|
||||
[(use (reg:SI 0))]
|
||||
"
|
||||
{
|
||||
rtx addr, reg, const_int;
|
||||
|
||||
if (GET_CODE (operands[1]) != MEM)
|
||||
FAIL;
|
||||
addr = XEXP (operands[1], 0);
|
||||
if (GET_CODE (addr) != PLUS)
|
||||
FAIL;
|
||||
reg = XEXP (addr, 0);
|
||||
const_int = XEXP (addr, 1);
|
||||
if (GET_CODE (reg) != REG || GET_CODE (const_int) != CONST_INT)
|
||||
FAIL;
|
||||
emit_move_insn (operands[2], const_int);
|
||||
emit_move_insn (change_address (operands[1], VOIDmode,
|
||||
gen_rtx (PLUS, SImode, reg, operands[2])),
|
||||
operands[0]);
|
||||
DONE;
|
||||
}")
|
||||
|
||||
(define_expand "movdf"
|
||||
[(set (match_operand:DF 0 "general_movdst_operand" "")
|
||||
(match_operand:DF 1 "general_movsrc_operand" ""))]
|
||||
|
Loading…
Reference in New Issue
Block a user