re PR target/36073 (ICE with -ffast-math and -mfpmath=sse,387)
authorUros Bizjak <ubizjak@gmail.com>
Mon, 28 Apr 2008 17:49:51 +0000 (19:49 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 28 Apr 2008 17:49:51 +0000 (19:49 +0200)
        PR target/36073
        * config/i386/i386.md
        (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_interunit):
        Change operand 1 predicate to nonimmediate_operand.

testsuite/ChangeLog:

        PR target/36073
        * gcc.target/i386/pr36073.c: New test.

From-SVN: r134757

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

index b8392545ac5b6b67fed34c9a75b294062eca92f2..83383da24c030b1115d073667a2c849a97f84d2d 100644 (file)
@@ -1,3 +1,10 @@
+2008-04-28  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/36073
+       * config/i386/i386.md
+       (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_interunit):
+       Change operand 1 predicate to nonimmediate_operand.
+
 2008-04-28  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/36060
@@ -16,7 +23,8 @@
 2008-04-28  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/36064
-       * config/i386/i386.md (floatdi<X87MODEF:mode>2_i387_with_xmm splitters):
+       * 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>
index 6e62157ee9bcce50f32882e41d2a745759942229..a68c7ec3af8b32254560a3f4ce59cafb8406f7ce 100644 (file)
 (define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_mixed_interunit"
   [(set (match_operand:MODEF 0 "register_operand" "=f,x,x")
        (float:MODEF
-         (match_operand:SSEMODEI24 1 "register_operand" "m,r,m")))]
+         (match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,r,m")))]
   "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT)
    && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387
    && (TARGET_INTER_UNIT_CONVERSIONS || optimize_size)"
index 70a716a69074582381e1521fd70666e18a25c905..4ac8b14be5e32ffdb6957ea59051d458fb21ba11 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-28  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/36073
+       * gcc.target/i386/pr36073.c: New test.
+
 2008-04-28  Richard Guenther  <rguenther@suse.de>
 
        PR testsuite/34223
diff --git a/gcc/testsuite/gcc.target/i386/pr36073.c b/gcc/testsuite/gcc.target/i386/pr36073.c
new file mode 100644 (file)
index 0000000..b158757
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O -march=core2 -mfpmath=sse,387 -ffast-math" } */
+
+extern double log (double x);
+extern int f (void);
+
+double cached_value;
+
+void g (void)
+{
+  cached_value = log (f ());
+}