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 x86_64 gcc.dg/i386-sse-2.c


Yes, this is the change Uros Bizjak wanted to make a week or three ago,
that I rejected.  Sorry, Uros.  At least I did say I'd reconsider if you
showed me it could still be a problem, and I found it myself...

What I said was true, we *ought* to be able to use ix86_binary_operator_ok
here, but in order to do that, we have to do more work when expanding
the builtin, such that we satisfy that predicate at the very beginning.
Which means duplicating a good portion of ix86_expand_binary_operator, which
doesn't really seem worthwhile.


r~


        * config/i386/i386.md (sse2_movsd): Remove ix86_binary_operator_ok
        check.

Index: i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.585
diff -c -p -d -u -r1.585 i386.md
--- i386.md	19 Dec 2004 08:07:19 -0000	1.585
+++ i386.md	20 Dec 2004 11:46:29 -0000
@@ -23873,13 +23873,18 @@
   [(set_attr "type" "ssecvt")
    (set_attr "mode" "DF")])
 
+;; ??? We ought to be using ix86_binary_operator_ok on this pattern, so
+;; that we enforce the whole matching memory thing through combine et al.
+;; But that requires that things be set up properly when invoked via an
+;; intrinsic, which we don't do.  Which leads to instantiate virtual regs
+;; lossage, as seen compiling gcc.dg/i386-sse-2.c for x86_64 at -O0.
 (define_insn "sse2_movsd"
   [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,m")
 	(vec_merge:V2DF
 	 (match_operand:V2DF 1 "nonimmediate_operand" "0,0,0")
 	 (match_operand:V2DF 2 "nonimmediate_operand" "x,m,x")
 	 (const_int 2)))]
-  "TARGET_SSE2 && ix86_binary_operator_ok (UNKNOWN, V2DFmode, operands)"
+  "TARGET_SSE2"
   "@movsd\t{%2, %0|%0, %2}
     movlpd\t{%2, %0|%0, %2}
     movlpd\t{%2, %0|%0, %2}"


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