re PR rtl-optimization/8178 (__builtin_ffs broken with -march=k6)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Sun, 19 Oct 2003 17:53:11 +0000 (19:53 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 19 Oct 2003 17:53:11 +0000 (17:53 +0000)
PR optimization/8178
* config/i386/i386.md (*movsi_zero): Delete.
(*ffs_no_cmove): Use ix86_expand_clear to zero the third operand.

Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r72680

gcc/ChangeLog
gcc/config/i386/i386.md

index 332704f33480cda806b2d1be2ad2edef12fc7d7c..f82fa3d56904edb1ed878114c6c57636fcd0e64b 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2003-10-19  Richard Henderson  <rth@redhat.com>
 
        * config/alpha/alpha.c (fix_operator): New.
index c79f1ddd5f00cef75bfd77462a35ba4e42bd3c2c..65c5f0d34d805a7a2ed21b746d697671fe80af40 100644 (file)
   [(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")
   ""
   "#"
   "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)))
              (clobber (reg:CC 17))])]
 {
   operands[3] = gen_lowpart (QImode, operands[2]);
+  ix86_expand_clear (operands[2]);
 })
 
 (define_insn "*ffssi_1"