re PR target/36064 (could not split insn with -O1 -march=nocona -m32)
authorUros Bizjak <ubizjak@gmail.com>
Mon, 28 Apr 2008 07:52:01 +0000 (09:52 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 28 Apr 2008 07:52:01 +0000 (09:52 +0200)
PR target/36064
* config/i386/i386.md (floatdi<X87MODEF:mode>2_i387_with_xmm splitters):
Use match_scratch instead of match_operand for operands 3 and 4.

testsuite/ChangeLog:

PR target/36064
* gcc.target/i386/pr36064.c: New test.

From-SVN: r134744

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr36064.c [new file with mode: 0644]

index f1144d6569679c3f056a8ebc95a628f8e0eb4cbf..95fcc4bbbf444419deb5096092ce8027c62c98aa 100644 (file)
@@ -1,3 +1,9 @@
+2008-04-28  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/36064
+       * config/i386/i386.md (floatdi<X87MODEF:mode>2_i387_with_xmm splitters):
+       Use match_scratch instead of match_operand for operands 3 and 4.
+
 2008-04-27  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/18754
index 71f6031320c48370b797fb57389e7590664cfb68..6e62157ee9bcce50f32882e41d2a745759942229 100644 (file)
 (define_split
   [(set (match_operand:X87MODEF 0 "register_operand" "")
        (float:X87MODEF (match_operand:DI 1 "register_operand" "")))
-   (clobber (match_operand:V4SI 3 "register_operand" ""))
-   (clobber (match_operand:V4SI 4 "register_operand" ""))
+   (clobber (match_scratch:V4SI 3 ""))
+   (clobber (match_scratch:V4SI 4 ""))
    (clobber (match_operand:DI 2 "memory_operand" ""))]
   "TARGET_80387 && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES
    && !TARGET_64BIT && !optimize_size
 (define_split
   [(set (match_operand:X87MODEF 0 "register_operand" "")
        (float:X87MODEF (match_operand:DI 1 "memory_operand" "")))
-   (clobber (match_operand:V4SI 2 "register_operand" ""))
-   (clobber (match_operand:V4SI 3 "register_operand" ""))
-   (clobber (match_operand:DI 4 "memory_operand" ""))]
+   (clobber (match_scratch:V4SI 3 ""))
+   (clobber (match_scratch:V4SI 4 ""))
+   (clobber (match_operand:DI 2 "memory_operand" ""))]
   "TARGET_80387 && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES
    && !TARGET_64BIT && !optimize_size
    && reload_completed
index 487696cd26a44c1253c5b4912e57c200cd690601..1cb44d35ee144c34c8793c71141339b3c4389290 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-28  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/36064
+       * gcc.target/i386/pr36064.c: New test.
+
 2008-04-28  Uros Bizjak  <ubizjak@gmail.com>
 
        PR testsuite/36056
diff --git a/gcc/testsuite/gcc.target/i386/pr36064.c b/gcc/testsuite/gcc.target/i386/pr36064.c
new file mode 100644 (file)
index 0000000..7964f28
--- /dev/null
@@ -0,0 +1,55 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O1 -march=core2" } */
+
+typedef long long ogg_int64_t;
+
+typedef struct vorbis_info
+{
+  long rate;
+} vorbis_info;
+
+typedef struct OggVorbis_File
+{
+  int seekable;
+  int links;
+  ogg_int64_t *pcmlengths;
+  vorbis_info *vi;
+  int ready_state;
+} OggVorbis_File;
+
+extern double ov_time_total (OggVorbis_File * vf, int i);
+extern int ov_pcm_seek_page (OggVorbis_File * vf, ogg_int64_t pos);
+
+int
+ov_time_seek_page (OggVorbis_File * vf, double seconds)
+{
+  int link = -1;
+  ogg_int64_t pcm_total = 0;
+  double time_total = 0.;
+
+  if (vf->ready_state < 2)
+    return (-131);
+  if (!vf->seekable)
+    return (-138);
+  if (seconds < 0)
+    return (-131);
+
+  for (link = 0; link < vf->links; link++)
+    {
+      double addsec = ov_time_total (vf, link);
+      if (seconds < time_total + addsec)
+       break;
+      time_total += addsec;
+      pcm_total += vf->pcmlengths[link * 2 + 1];
+    }
+
+  if (link == vf->links)
+    return (-131);
+
+  {
+    ogg_int64_t target =
+      pcm_total + (seconds - time_total) * vf->vi[link].rate;
+    return (ov_pcm_seek_page (vf, target));
+  }
+}