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: [PATCH, i386]: Committed: Fix PR target/32708


Hi,
> The problem is that vec_concatv2di pattern doesn't have "r" register 
> constraint for its 2nd input operand. "r" would be invalid for 32bit 
> targets, so we need another pattern for 64bit targets. The above test 
> then compiles depending on TARGET_INTER_UNIT_MOVES into:
> 
> k8:
> 
> long2vector:
> .LFB3:
>        movq    %rdi, -8(%rsp)
>        movq    -8(%rsp), %xmm0
>        ret
> 
> core2:
> 
> long2vector:
> .LFB3:
>        movq    %rdi, %xmm0
>        ret

Nice. However
> +(define_insn "*vec_concatv2di_rex"
> +  [(set (match_operand:V2DI 0 "register_operand"     "=Yt,Yi,!Yt,Yt,x,x,x")
> +	(vec_concat:V2DI
> +	  (match_operand:DI 1 "nonimmediate_operand" "  m,r ,*y ,0 ,0,0,m")
> +	  (match_operand:DI 2 "vector_move_operand"  "  C,C ,C  ,Yt,x,m,0")))]

It seems to me that for NO_INTER_UNIT_MOVES you need the variant of this
pattern with second alternative skipped. Otherwise we will end up
preferencing the register in some cases.  I wonder how the
INTER_UNIT_MOVES affected your testcase above?

Honza


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