This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Committed: Fix PR target/32708
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 11 Jul 2007 02:33:30 +0200
- Subject: Re: [PATCH, i386]: Committed: Fix PR target/32708
- References: <4693DD89.1060909@gmail.com>
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