- Add ctz patterns.
authorDavid Edelsohn <edelsohn@gnu.org>
Sat, 8 Feb 2003 03:59:40 +0000 (03:59 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Sat, 8 Feb 2003 03:59:40 +0000 (22:59 -0500)
From-SVN: r62572

gcc/ChangeLog
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/rs6000.md

index 92e0d2b1c209a857033f2572e90543cc9fd42e4f..0c5d5ae0d6e5e7c5b31d1772cf8331f7a7165cf9 100644 (file)
@@ -2,8 +2,10 @@
 
        * config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
        * config/rs6000/rs6000.md (clzsi2): Rename from cntlzw2.
+       (ctzsi2): New pattern.
        (ffssi2): Use clz instead of unspec.
        (clzdi2): Rename from cntlzd2.
+       (ctzdi2): New pattern.
        (ffsdi2): Use clz instead of unspec.
 
 2003-02-07  Loren James Rittle  <ljrittle@acm.org>
index 31c88a0b4050bd55218863b85f3d710698c2b976..1381ca41b1751a61e093dcadb6a96806753c88fd 100644 (file)
@@ -2270,10 +2270,13 @@ do {                                                                         \
    is done just by pretending it is already truncated.  */
 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
 
-/* The cntlzw and cntlzd instructions return 32 and 64 for zero.  */
+/* The cntlzw and cntlzd instructions return 32 and 64 for input of zero.  */
 #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \
   ((VALUE) = ((MODE) == SImode ? 32 : 64))
 
+/* The CTZ patterns return -1 for input of zero.  */
+#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = -1)
+
 /* Specify the machine mode that pointers have.
    After generation of rtl, the compiler makes no further distinction
    between pointers and any other objects of this machine mode.  */
index e4a17cf26af8f3b863d89d111c05e9b6343e92f1..142159d6fe56ae74e9e19dc6616fa15b818a3c17 100644 (file)
@@ -36,7 +36,6 @@
 ;; 16          macho_correct_pic
 ;; 19          movesi_from_cr
 ;; 20          movesi_to_cr
-;; 21          cntlz{w,d}2     count lead zero word/double word
 \f
 ;; Define an insn type attribute.  This is used in function unit delay
 ;; computations.