(addsi): New add to lea splitter.
* (addsi): New add to lea splitter. (ashlsi): Likewise. (lea to add/shift peep2): New. From-SVN: r30745
This commit is contained in:
parent
c45fd7f9b2
commit
1c27d4b20f
|
@ -1,3 +1,9 @@
|
|||
Fri Nov 26 10:59:12 CET 1999 Jan Hubicka <hubicka@freesoft.cz>
|
||||
|
||||
* (addsi): New add to lea splitter.
|
||||
(ashlsi): Likewise.
|
||||
(lea to add/shift peep2): New.
|
||||
|
||||
1999-12-01 Mark Salter <msalter@cygnus.com>
|
||||
|
||||
* config/mips/elf.h (STARTFILE_SPEC): Add no-crt0.
|
||||
|
|
|
@ -2107,7 +2107,7 @@
|
|||
(define_insn "*zero_extendqihi2_movzbw"
|
||||
[(set (match_operand:HI 0 "register_operand" "=r")
|
||||
(zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "qm")))]
|
||||
"!TARGET_ZERO_EXTEND_WITH_AND || optimize_size"
|
||||
"(!TARGET_ZERO_EXTEND_WITH_AND || optimize_size) && reload_completed"
|
||||
"movz{bw|x}\\t{%1, %0|%0, %1}"
|
||||
[(set_attr "type" "imovx")])
|
||||
|
||||
|
@ -3096,6 +3096,19 @@
|
|||
]
|
||||
(const_string "alu")))])
|
||||
|
||||
;; Convert lea to the lea pattern to avoid flags dependency.
|
||||
(define_split
|
||||
[(set (match_operand:SI 0 "register_operand" "")
|
||||
(plus:SI (match_operand:SI 1 "register_operand" "")
|
||||
(match_operand:SI 2 "nonmemory_operand" "")))
|
||||
(clobber (reg:CC 17))]
|
||||
"reload_completed
|
||||
&& true_regnum (operands[0]) != true_regnum (operands[1])"
|
||||
[(set (match_dup 0)
|
||||
(plus:SI (match_dup 1)
|
||||
(match_dup 2)))]
|
||||
"")
|
||||
|
||||
(define_insn "*addsi_2"
|
||||
[(set (reg:CCNO 17)
|
||||
(compare:CCNO
|
||||
|
@ -5501,6 +5514,19 @@
|
|||
]
|
||||
(const_string "ishift")))])
|
||||
|
||||
;; Convert lea to the lea pattern to avoid flags dependency.
|
||||
(define_split
|
||||
[(set (match_operand:SI 0 "register_operand" "")
|
||||
(ashift:SI (match_operand:SI 1 "register_operand" "")
|
||||
(match_operand:QI 2 "immediate_operand" "")))
|
||||
(clobber (reg:CC 17))]
|
||||
"reload_completed
|
||||
&& true_regnum (operands[0]) != true_regnum (operands[1])"
|
||||
[(set (match_dup 0)
|
||||
(mult:SI (match_dup 1)
|
||||
(match_dup 2)))]
|
||||
"operands[2] = GEN_INT (1 << INTVAL (operands[2]));")
|
||||
|
||||
(define_insn "*ashlsi3_cmpno"
|
||||
[(set (reg:CCNO 17)
|
||||
(compare:CCNO
|
||||
|
@ -8494,6 +8520,26 @@
|
|||
[(parallel [(set (match_dup 0) (const_int -1))
|
||||
(clobber (reg:CC 17))])]
|
||||
"operands[0] = gen_rtx_REG (SImode, true_regnum (operands[0]));")
|
||||
|
||||
;; Attempt to convert simple leas to adds. These can be created by
|
||||
;; move expanders.
|
||||
(define_peephole2
|
||||
[(set (match_operand:SI 0 "register_operand" "")
|
||||
(plus:SI (match_dup 0)
|
||||
(match_operand:SI 1 "nonmemory_operand" "")))]
|
||||
"reg_dead_p (insn, gen_rtx_REG (CCmode, FLAGS_REG))"
|
||||
[(parallel [(set (match_dup 0) (plus:SI (match_dup 0) (match_dup 1)))
|
||||
(clobber (reg:CC 17))])]
|
||||
"")
|
||||
|
||||
(define_peephole2
|
||||
[(set (match_operand:SI 0 "register_operand" "")
|
||||
(mult:SI (match_dup 0)
|
||||
(match_operand:SI 1 "immediate_operand" "")))]
|
||||
"reg_dead_p (insn, gen_rtx_REG (CCmode, FLAGS_REG))"
|
||||
[(parallel [(set (match_dup 0) (ashift:SI (match_dup 0) (match_dup 2)))
|
||||
(clobber (reg:CC 17))])]
|
||||
"operands[2] = GEN_INT (exact_log2 (INTVAL (operands[1])));")
|
||||
|
||||
;; Call-value patterns last so that the wildcard operand does not
|
||||
;; disrupt insn-recog's switch tables.
|
||||
|
|
Loading…
Reference in New Issue