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]

fix p4 gcc.c-torture/execute/simd-1.c


Discovered while bootstrapping --with-arch=pentium4.

The operands to sse2_umulv2siv2di3, which both of these patterns use,
must satisfy ix86_binary_operator_ok.  Which is not true if both are
given as memories.  Since we need to do lots of other operations on
these operands, we should go ahead and force them into memory.


r~

        * config/i386/sse.md (mulv4si3): Use all register inputs.
        (mulv2di3): Likewise.

Index: config/i386/sse.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/sse.md,v
retrieving revision 1.13
diff -u -p -d -r1.13 sse.md
--- config/i386/sse.md	17 May 2005 08:15:41 -0000	1.13
+++ config/i386/sse.md	19 May 2005 21:18:19 -0000
@@ -2536,8 +2536,8 @@
 
 (define_expand "mulv4si3"
   [(set (match_operand:V4SI 0 "register_operand" "")
-	(mult:V4SI (match_operand:V4SI 1 "nonimmediate_operand" "")
-		   (match_operand:V4SI 2 "nonimmediate_operand" "")))]
+	(mult:V4SI (match_operand:V4SI 1 "register_operand" "")
+		   (match_operand:V4SI 2 "register_operand" "")))]
   "TARGET_SSE2"
 {
   rtx t1, t2, t3, t4, t5, t6, thirtytwo;
@@ -2582,8 +2582,8 @@
 
 (define_expand "mulv2di3"
   [(set (match_operand:V2DI 0 "register_operand" "")
-	(mult:V2DI (match_operand:V2DI 1 "nonimmediate_operand" "")
-		   (match_operand:V2DI 2 "nonimmediate_operand" "")))]
+	(mult:V2DI (match_operand:V2DI 1 "register_operand" "")
+		   (match_operand:V2DI 2 "register_operand" "")))]
   "TARGET_SSE2"
 {
   rtx t1, t2, t3, t4, t5, t6, thirtytwo;


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