OSDN Git Service

* config/i386/i386.c (ix86_split_ashrdi): Optimize shift by 63.
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Mar 2004 17:21:32 +0000 (17:21 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Mar 2004 17:21:32 +0000 (17:21 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79397 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c

index e2821e3..ca4525c 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-12  Roger Sayle  <roger@eyesopen.com>
+
+       * config/i386/i386.c (ix86_split_ashrdi): Optimize shift by 63.
+
 2004-03-12  Matt Austern  <austern@apple.com>
 
        * target.h (struct gcc_target): New target hook, unwind_label.
index 58e2633..dadd18d 100644 (file)
@@ -10873,7 +10873,14 @@ ix86_split_ashrdi (rtx *operands, rtx scratch)
       split_di (operands, 2, low, high);
       count = INTVAL (operands[2]) & 63;
 
-      if (count >= 32)
+      if (count == 63)
+       {
+         emit_move_insn (high[0], high[1]);
+         emit_insn (gen_ashrsi3 (high[0], high[0], GEN_INT (31)));
+         emit_move_insn (low[0], high[0]);
+
+       }
+      else if (count >= 32)
        {
          emit_move_insn (low[0], high[1]);