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]

Re: [tree-ssa] xfail i386-ssetypes-[13].c


> The i386 patterns that are supposed to avoid the movdqa are extraordinarily
> fragile.  The only difference between tree-ssa and mainline is the exact
> initial state of the operands.  Technically, I'd consider tree-ssa superior,
> as it begins with one fewer rtl insn.
> 
> I have no idea how to fix this except to avoid using logical:TI here at all.
> Alternatives are unspec:V2DF or (possibly) logical:V2DF.

In the case we manage to confuse ourselves and produce reformating
penalty, something has to be done.  It is way too expensive.
What about this patch I made some time ago?  The problem is that we
construct (subreg (mem)) operand and the test requiring only one memory
operand gets confused.  Easiest way to get around this is the following
patch.

I would preffer it rather than xfailing the tests.
Alternative would be to add some simplify_gen_subreg calls and
match_dups around, but I don't see way to write it clearly.  Forcing
operand to register during expansion is non-critical.

Honza

2004-02-04  Jan Hubicka  <jh@suse.cz>
	* i386.md (sse/sse2 packed logical expanders): Do not accept memory
	operands.
Index: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.374.2.37
diff -c -3 -p -r1.374.2.37 i386.md
*** config/i386/i386.md	30 Jan 2004 13:15:11 -0000	1.374.2.37
--- config/i386/i386.md	4 Feb 2004 12:27:30 -0000
***************
*** 19609,19615 ****
  (define_expand "sse_andv4sf3"
    [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0)
          (and:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))]
    "TARGET_SSE"
    "")
  
--- 19609,19615 ----
  (define_expand "sse_andv4sf3"
    [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0)
          (and:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V4SF 2 "register_operand" "") 0)))]
    "TARGET_SSE"
    "")
  
***************
*** 19636,19642 ****
  (define_expand "sse_nandv4sf3"
    [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0)
          (and:TI (not:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0))
! 	        (subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))]
    "TARGET_SSE"
    "")
  
--- 19636,19642 ----
  (define_expand "sse_nandv4sf3"
    [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0)
          (and:TI (not:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0))
! 	        (subreg:TI (match_operand:V4SF 2 "register_operand" "") 0)))]
    "TARGET_SSE"
    "")
  
***************
*** 19661,19667 ****
  (define_expand "sse_iorv4sf3"
    [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0)
          (ior:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))]
    "TARGET_SSE"
    "")
  
--- 19661,19667 ----
  (define_expand "sse_iorv4sf3"
    [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0)
          (ior:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V4SF 2 "register_operand" "") 0)))]
    "TARGET_SSE"
    "")
  
***************
*** 19688,19694 ****
  (define_expand "sse_xorv4sf3"
    [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0)
          (xor:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V4SF 2 "nonimmediate_operand" "") 0)))]
    "TARGET_SSE
     && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
    "")
--- 19688,19694 ----
  (define_expand "sse_xorv4sf3"
    [(set (subreg:TI (match_operand:V4SF 0 "register_operand" "") 0)
          (xor:TI (subreg:TI (match_operand:V4SF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V4SF 2 "register_operand" "") 0)))]
    "TARGET_SSE
     && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)"
    "")
***************
*** 19718,19724 ****
  (define_expand "sse2_andv2df3"
    [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0)
          (and:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0)
! 	        (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))]
    "TARGET_SSE2"
    "")
  
--- 19718,19724 ----
  (define_expand "sse2_andv2df3"
    [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0)
          (and:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0)
! 	        (subreg:TI (match_operand:V2DF 2 "register_operand" "") 0)))]
    "TARGET_SSE2"
    "")
  
***************
*** 19745,19751 ****
  (define_expand "sse2_nandv2df3"
    [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0)
          (and:TI (not:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0))
! 	        (subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))]
    "TARGET_SSE2"
    "")
  
--- 19745,19751 ----
  (define_expand "sse2_nandv2df3"
    [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0)
          (and:TI (not:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0))
! 	        (subreg:TI (match_operand:V2DF 2 "register_operand" "") 0)))]
    "TARGET_SSE2"
    "")
  
***************
*** 19770,19776 ****
  (define_expand "sse2_iorv2df3"
    [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0)
          (ior:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))]
    "TARGET_SSE2"
    "")
  
--- 19770,19776 ----
  (define_expand "sse2_iorv2df3"
    [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0)
          (ior:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V2DF 2 "register_operand" "") 0)))]
    "TARGET_SSE2"
    "")
  
***************
*** 19796,19803 ****
  
  (define_expand "sse2_xorv2df3"
    [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0)
!         (xor:TI (subreg:TI (match_operand:V2DF 1 "nonimmediate_operand" "") 0)
! 		(subreg:TI (match_operand:V2DF 2 "nonimmediate_operand" "") 0)))]
    "TARGET_SSE2"
    "")
  
--- 19796,19803 ----
  
  (define_expand "sse2_xorv2df3"
    [(set (subreg:TI (match_operand:V2DF 0 "register_operand" "") 0)
!         (xor:TI (subreg:TI (match_operand:V2DF 1 "register_operand" "") 0)
! 		(subreg:TI (match_operand:V2DF 2 "register_operand" "") 0)))]
    "TARGET_SSE2"
    "")
  


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