Patch to improve x86 FP negate patterns
John Wehle
john@feith.com
Wed Apr 21 23:48:00 GMT 1999
This sets the type attribute for the FP negate patterns and adds
a new pattern which matches negating while extending SF to XF.
ChangeLog:
Thu Apr 22 00:58:25 EDT 1999 John Wehle (john@feith.com)
* i386.md (negsf2, negdf2, negxf2): Set the type
attribute to fpop.
(negxf2+2): New pattern.
Enjoy!
-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/config/i386/i386.md.ORIGINAL Thu Apr 22 00:44:35 1999
--- gcc/config/i386/i386.md.JLW Thu Apr 22 00:37:47 1999
*************** byte_xor_operation:
*** 4765,4795 ****
[(set (match_operand:SF 0 "register_operand" "=f")
(neg:SF (match_operand:SF 1 "register_operand" "0")))]
"TARGET_80387"
! "fchs")
(define_insn "negdf2"
[(set (match_operand:DF 0 "register_operand" "=f")
(neg:DF (match_operand:DF 1 "register_operand" "0")))]
"TARGET_80387"
! "fchs")
(define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f")
(neg:DF (float_extend:DF (match_operand:SF 1 "register_operand" "0"))))]
"TARGET_80387"
! "fchs")
(define_insn "negxf2"
[(set (match_operand:XF 0 "register_operand" "=f")
(neg:XF (match_operand:XF 1 "register_operand" "0")))]
"TARGET_80387"
! "fchs")
(define_insn ""
[(set (match_operand:XF 0 "register_operand" "=f")
(neg:XF (float_extend:XF (match_operand:DF 1 "register_operand" "0"))))]
"TARGET_80387"
! "fchs")
;; Absolute value instructions
--- 4765,4807 ----
[(set (match_operand:SF 0 "register_operand" "=f")
(neg:SF (match_operand:SF 1 "register_operand" "0")))]
"TARGET_80387"
! "fchs"
! [(set_attr "type" "fpop")])
(define_insn "negdf2"
[(set (match_operand:DF 0 "register_operand" "=f")
(neg:DF (match_operand:DF 1 "register_operand" "0")))]
"TARGET_80387"
! "fchs"
! [(set_attr "type" "fpop")])
(define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f")
(neg:DF (float_extend:DF (match_operand:SF 1 "register_operand" "0"))))]
"TARGET_80387"
! "fchs"
! [(set_attr "type" "fpop")])
(define_insn "negxf2"
[(set (match_operand:XF 0 "register_operand" "=f")
(neg:XF (match_operand:XF 1 "register_operand" "0")))]
"TARGET_80387"
! "fchs"
! [(set_attr "type" "fpop")])
(define_insn ""
[(set (match_operand:XF 0 "register_operand" "=f")
(neg:XF (float_extend:XF (match_operand:DF 1 "register_operand" "0"))))]
"TARGET_80387"
! "fchs"
! [(set_attr "type" "fpop")])
!
! (define_insn ""
! [(set (match_operand:XF 0 "register_operand" "=f")
! (neg:XF (float_extend:XF (match_operand:SF 1 "register_operand" "0"))))]
! "TARGET_80387"
! "fchs"
! [(set_attr "type" "fpop")])
;; Absolute value instructions
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------
More information about the Gcc-patches
mailing list