This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[3.4] fix target/17990


I believe that the original alignment complaint in this pr is
either fixed due to 17930, or due to broken system startup.

But that aside, we shouldn't have been using sse math in the
first place.  Without -mfpmath, and without the autovectorizer,
the only sse code in the program should be written by the user.

This is the absolute minimal cleanup version of this patch,
which is about all I can justify for 3.4.  For 4.0, Uros Bizjak
and I are coordinating a cleanup of the relevant patterns and
conditionals.


r~


        PR target/17990
        * config/i386/i386.md (negsf2): Fix condition for using sse.
        (negdf2, abssf2, absdf2): Likewise.
        (negsf2_if, abssf2_if): Don't disable if sse enabled.
        (movv4sf_internal splitter): Postpone til after reload.
        (movv2di_internal splitter): Likewise.

Index: i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.502.2.10
diff -c -p -d -u -r1.502.2.10 i386.md
--- i386.md	12 Dec 2004 20:59:23 -0000	1.502.2.10
+++ i386.md	14 Dec 2004 01:40:04 -0000
@@ -9600,8 +9600,8 @@
   [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "")
 		   (neg:SF (match_operand:SF 1 "nonimmediate_operand" "")))
 	      (clobber (reg:CC 17))])]
-  "TARGET_80387"
-  "if (TARGET_SSE)
+  "TARGET_80387 || TARGET_SSE_MATH"
+  "if (TARGET_SSE_MATH)
      {
        /* In case operand is in memory,  we will not use SSE.  */
        if (memory_operand (operands[0], VOIDmode)
@@ -9697,7 +9697,7 @@
   [(set (match_operand:SF 0 "nonimmediate_operand" "=f#r,rm#f")
 	(neg:SF (match_operand:SF 1 "nonimmediate_operand" "0,0")))
    (clobber (reg:CC 17))]
-  "TARGET_80387 && !TARGET_SSE
+  "TARGET_80387
    && ix86_unary_operator_ok (NEG, SFmode, operands)"
   "#")
 
@@ -9740,8 +9740,8 @@
   [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "")
 		   (neg:DF (match_operand:DF 1 "nonimmediate_operand" "")))
 	      (clobber (reg:CC 17))])]
-  "TARGET_80387"
-  "if (TARGET_SSE2)
+  "TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)"
+  "if (TARGET_SSE2 && TARGET_SSE_MATH)
      {
        /* In case operand is in memory,  we will not use SSE.  */
        if (memory_operand (operands[0], VOIDmode)
@@ -10007,8 +10007,8 @@
   [(parallel [(set (match_operand:SF 0 "nonimmediate_operand" "")
 		   (neg:SF (match_operand:SF 1 "nonimmediate_operand" "")))
 	      (clobber (reg:CC 17))])]
-  "TARGET_80387"
-  "if (TARGET_SSE)
+  "TARGET_80387 || TARGET_SSE_MATH"
+  "if (TARGET_SSE_MATH)
      {
        /* In case operand is in memory,  we will not use SSE.  */
        if (memory_operand (operands[0], VOIDmode)
@@ -10104,7 +10104,7 @@
   [(set (match_operand:SF 0 "nonimmediate_operand" "=f#r,rm#f")
 	(abs:SF (match_operand:SF 1 "nonimmediate_operand" "0,0")))
    (clobber (reg:CC 17))]
-  "TARGET_80387 && ix86_unary_operator_ok (ABS, SFmode, operands) && !TARGET_SSE"
+  "TARGET_80387 && ix86_unary_operator_ok (ABS, SFmode, operands)"
   "#")
 
 (define_split
@@ -10146,8 +10146,8 @@
   [(parallel [(set (match_operand:DF 0 "nonimmediate_operand" "")
 		   (neg:DF (match_operand:DF 1 "nonimmediate_operand" "")))
 	      (clobber (reg:CC 17))])]
-  "TARGET_80387"
-  "if (TARGET_SSE2)
+  "TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)"
+  "if (TARGET_SSE2 && TARGET_SSE_MATH)
      {
        /* In case operand is in memory,  we will not use SSE.  */
        if (memory_operand (operands[0], VOIDmode)
@@ -18434,7 +18434,7 @@
 (define_split
   [(set (match_operand:V4SF 0 "register_operand" "")
 	(match_operand:V4SF 1 "zero_extended_scalar_load_operand" ""))]
-  "TARGET_SSE"
+  "TARGET_SSE && reload_completed"
   [(set (match_dup 0)
 	(vec_merge:V4SF
 	 (vec_duplicate:V4SF (match_dup 1))
@@ -18528,7 +18528,7 @@
 (define_split
   [(set (match_operand:V2DF 0 "register_operand" "")
 	(match_operand:V2DF 1 "zero_extended_scalar_load_operand" ""))]
-  "TARGET_SSE2"
+  "TARGET_SSE2 && reload_completed"
   [(set (match_dup 0)
 	(vec_merge:V2DF
 	 (vec_duplicate:V2DF (match_dup 1))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]