From 0d5fd2b8e3a038293d2c6303876ee6e821e16aca Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 28 Apr 2008 19:49:51 +0200 Subject: [PATCH] re PR target/36073 (ICE with -ffast-math and -mfpmath=sse,387) PR target/36073 * config/i386/i386.md (*float2_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 | 10 +++++++++- gcc/config/i386/i386.md | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr36073.c | 12 ++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr36073.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b8392545ac5..83383da24c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-04-28 Uros Bizjak + + PR target/36073 + * config/i386/i386.md + (*float2_mixed_interunit): + Change operand 1 predicate to nonimmediate_operand. + 2008-04-28 Jakub Jelinek PR debug/36060 @@ -16,7 +23,8 @@ 2008-04-28 Uros Bizjak PR target/36064 - * config/i386/i386.md (floatdi2_i387_with_xmm splitters): + * config/i386/i386.md + (floatdi2_i387_with_xmm splitters): Use match_scratch instead of match_operand for operands 3 and 4. 2008-04-27 Richard Guenther diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 6e62157ee9b..a68c7ec3af8 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -5035,7 +5035,7 @@ (define_insn "*float2_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")))] "(mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (mode) && TARGET_MIX_SSE_I387 && (TARGET_INTER_UNIT_CONVERSIONS || optimize_size)" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 70a716a6907..4ac8b14be5e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-04-28 Uros Bizjak + + PR target/36073 + * gcc.target/i386/pr36073.c: New test. + 2008-04-28 Richard Guenther 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 index 00000000000..b1587579e32 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr36073.c @@ -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 ()); +} -- 2.30.2