public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Do we really need Y2/TARGET_SSE2 on V16QI/V8HI/V2DF/V2DI?
@ 2008-05-20  5:44 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2008-05-20  5:44 UTC (permalink / raw)
  To: gcc; +Cc: ubizjak

i386.h has

#define VALID_SSE2_REG_MODE(MODE) \
  ((MODE) == V16QImode || (MODE) == V8HImode || (MODE) == V2DFmode \
   || (MODE) == V2DImode || (MODE) == DFmode)

#define VALID_SSE_REG_MODE(MODE) \
  ((MODE) == TImode || (MODE) == V4SFmode || (MODE) == V4SImode \
   || (MODE) == SFmode || (MODE) == TFmode)

That is V16QImode, V8HImode, V2DFmode and V2DImode are only available
for SSE2 or above. However, there are many things like:

(define_insn "*vec_concatv2df"
  [(set (match_operand:V2DF 0 "register_operand"     "=Y2,Y2,Y2,x,x")
        (vec_concat:V2DF
          (match_operand:DF 1 "nonimmediate_operand" " 0 ,0 ,m ,0,0")
          (match_operand:DF 2 "vector_move_operand"  " Y2,m ,C ,x,m")))]
  "TARGET_SSE"
  "@
   unpcklpd\t{%2, %0|%0, %2}
   movhpd\t{%2, %0|%0, %2}
   movsd\t{%1, %0|%0, %1}
   movlhps\t{%2, %0|%0, %2}
   movhps\t{%2, %0|%0, %2}"
  [(set_attr "type" "sselog,ssemov,ssemov,ssemov,ssemov")
   (set_attr "mode" "V2DF,V1DF,DF,V4SF,V2SF")])

(define_insn "*vec_dupv2di"
  [(set (match_operand:V2DI 0 "register_operand" "=Y2,x")
        (vec_duplicate:V2DI
          (match_operand:DI 1 "register_operand" " 0 ,0")))]
  "TARGET_SSE"
  "@
   punpcklqdq\t%0, %0
   movlhps\t%0, %0"
  [(set_attr "type" "sselog1,ssemov")
   (set_attr "mode" "TI,V4SF")])

if (TARGET_SSE2 && mode == V2DFmode)
 ...

    case V8HImode:
      if (TARGET_SSE2)


Do we really need to check TARGET_SSE2 on modes which are enabled
only for SSE2? If they are just oversights, I will try to fix them.

Thanks.


H.J.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-20  5:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-20  5:44 Do we really need Y2/TARGET_SSE2 on V16QI/V8HI/V2DF/V2DI? H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).