This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR optimization/8178 (x86)


> The correct fix is to remove the first pattern of the split
> and invoke ix86_expand_clear from the { } .

Ah! ok, thanks. Nice little function :-)

Bootstrapped/regtested on k6-redhat-linux-gnu (mainline, except Ada).


2003-10-19  Eric Botcazou  <ebotcazou@libertysurf.fr>
            Richard Henderson <rth@redhat.com>

        PR optimization/8178
        * config/i386/i386.md (*movsi_zero): Delete.
	(*ffs_no_cmove): Use ix86_expand_clear to zero
	the third operand.

-- 
Eric Botcazou
Index: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.485
diff -u -r1.485 i386.md
--- config/i386/i386.md	18 Oct 2003 07:24:59 -0000	1.485
+++ config/i386/i386.md	18 Oct 2003 20:19:13 -0000
@@ -1161,15 +1161,6 @@
   [(set_attr "type" "alu1")
    (set_attr "mode" "SI")
    (set_attr "length_immediate" "0")])
-
-(define_insn "*movsi_zero"
-  [(set (match_operand:SI 0 "register_operand" "=r")
-	(match_operand:SI 1 "const0_operand" "i"))
-   (clobber (reg:CC 17))]
-  "reload_completed && (TARGET_USE_MOV0 && !optimize_size)"
-  "mov{l}\t{%1, %0|%0, %1}"
-  [(set_attr "type" "imov")
-   (set_attr "mode" "SI")])
  
 (define_insn "*movsi_or"
   [(set (match_operand:SI 0 "register_operand" "=r")
@@ -14464,9 +14455,7 @@
   ""
   "#"
   "reload_completed"
-  [(parallel [(set (match_dup 2) (const_int 0))
-	      (clobber (reg:CC 17))])
-   (parallel [(set (reg:CCZ 17) (compare:CCZ (match_dup 1) (const_int 0)))
+  [(parallel [(set (reg:CCZ 17) (compare:CCZ (match_dup 1) (const_int 0)))
 	      (set (match_dup 0) (ctz:SI (match_dup 1)))])
    (set (strict_low_part (match_dup 3))
 	(eq:QI (reg:CCZ 17) (const_int 0)))
@@ -14478,6 +14467,7 @@
 	      (clobber (reg:CC 17))])]
 {
   operands[3] = gen_lowpart (QImode, operands[2]);
+  ix86_expand_clear (operands[2]);
 })
 
 (define_insn "*ffssi_1"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]