Commit 7e55f2d8 by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/79593 (Poor/Worse code generation for FPU on versions after 6)

	PR rtl-optimization/79593
	* config/i386/i386.md (reg = mem; mem = reg): New define_peephole2.

From-SVN: r267740
parent 524abb09
2019-01-08 Jakub Jelinek <jakub@redhat.com> 2019-01-08 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/79593
* config/i386/i386.md (reg = mem; mem = reg): New define_peephole2.
* config/rs6000/rs6000.c (rs6000_delegitimize_address): Delegitimize * config/rs6000/rs6000.c (rs6000_delegitimize_address): Delegitimize
UNSPEC_FUSION_GPR to its argument. Formatting fixes. UNSPEC_FUSION_GPR to its argument. Formatting fixes.
......
...@@ -18740,6 +18740,18 @@ ...@@ -18740,6 +18740,18 @@
const0_rtx); const0_rtx);
}) })
;; Attempt to optimize away memory stores of values the memory already
;; has. See PR79593.
(define_peephole2
[(set (match_operand 0 "register_operand")
(match_operand 1 "memory_operand"))
(set (match_operand 2 "memory_operand") (match_dup 0))]
"!MEM_VOLATILE_P (operands[1])
&& !MEM_VOLATILE_P (operands[2])
&& rtx_equal_p (operands[1], operands[2])
&& !reg_overlap_mentioned_p (operands[0], operands[2])"
[(set (match_dup 0) (match_dup 1))])
;; Attempt to always use XOR for zeroing registers (including FP modes). ;; Attempt to always use XOR for zeroing registers (including FP modes).
(define_peephole2 (define_peephole2
[(set (match_operand 0 "general_reg_operand") [(set (match_operand 0 "general_reg_operand")
......
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