This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Path to tweak x86 extendsidi2 for value range propagation
- To: gcc-patches at gcc dot gnu dot org
- Subject: Path to tweak x86 extendsidi2 for value range propagation
- From: John Wehle <john at feith dot com>
- Date: Fri, 5 May 2000 15:40:10 -0400 (EDT)
This patch changes the extendsidi2 clobber ordering so that it matches
the zero_extendsidi2 clobber ordering which allows value range propagation
to convert extendsidi2 to zero_extendsidi2 when the msb is known to be zero.
This patch passes make bootstrap and make check on FreeBSD-3.4 x86.
ChangeLog:
Fri May 5 01:11:59 EDT 2000 John Wehle (john@feith.com)
* i386.md (extendsidi2): Clobber (reg:CC 17) in the
same fashion as zero_extendsidi2.
Enjoy!
-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/config/i386/i386.md.ORIGINAL Mon May 1 02:51:36 2000
--- gcc/config/i386/i386.md Fri May 5 01:01:06 2000
***************
*** 2642,2649 ****
(define_insn "extendsidi2"
[(set (match_operand:DI 0 "nonimmediate_operand" "=*A,r,?r,?*o")
(sign_extend:DI (match_operand:SI 1 "register_operand" "0,0,r,r")))
! (clobber (match_scratch:SI 2 "=X,X,X,&r"))
! (clobber (reg:CC 17))]
""
"#")
--- 2642,2649 ----
(define_insn "extendsidi2"
[(set (match_operand:DI 0 "nonimmediate_operand" "=*A,r,?r,?*o")
(sign_extend:DI (match_operand:SI 1 "register_operand" "0,0,r,r")))
! (clobber (reg:CC 17))
! (clobber (match_scratch:SI 2 "=X,X,X,&r"))]
""
"#")
***************
*** 2651,2658 ****
(define_split
[(set (match_operand:DI 0 "memory_operand" "")
(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
! (clobber (match_operand:SI 2 "register_operand" ""))
! (clobber (reg:CC 17))]
"(reload_completed
&& dead_or_set_p (insn, operands[1])
&& !reg_mentioned_p (operands[1], operands[0]))"
--- 2651,2658 ----
(define_split
[(set (match_operand:DI 0 "memory_operand" "")
(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
! (clobber (reg:CC 17))
! (clobber (match_operand:SI 2 "register_operand" ""))]
"(reload_completed
&& dead_or_set_p (insn, operands[1])
&& !reg_mentioned_p (operands[1], operands[0]))"
***************
*** 2666,2673 ****
(define_split
[(set (match_operand:DI 0 "memory_operand" "")
(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
! (clobber (match_operand:SI 2 "register_operand" ""))
! (clobber (reg:CC 17))]
"reload_completed"
[(const_int 0)]
"
--- 2666,2673 ----
(define_split
[(set (match_operand:DI 0 "memory_operand" "")
(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
! (clobber (reg:CC 17))
! (clobber (match_operand:SI 2 "register_operand" ""))]
"reload_completed"
[(const_int 0)]
"
***************
*** 2697,2704 ****
(define_split
[(set (match_operand:DI 0 "register_operand" "")
(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
! (clobber (match_scratch:SI 2 ""))
! (clobber (reg:CC 17))]
"reload_completed"
[(const_int 0)]
"
--- 2697,2704 ----
(define_split
[(set (match_operand:DI 0 "register_operand" "")
(sign_extend:DI (match_operand:SI 1 "register_operand" "")))
! (clobber (reg:CC 17))
! (clobber (match_scratch:SI 2 ""))]
"reload_completed"
[(const_int 0)]
"
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------