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: Add register source to movddup


On 10/14/18, Alexander Monakov <amonakov@ispras.ru> wrote:
> On Sun, 14 Oct 2018, Uros Bizjak wrote:
>> > +/* { dg-final { scan-assembler-times "punpcklqdq\[ \\t\]+%xmm\[0-9\],\[
>> > \\t\]+%xmm\[0-9\]" 1 } } */
>>
>> You need to scan for %xmm\[0-9\]+, otherwise xmm10 is already out of
>> luck.
>
> I think it would be preferable to scan for 'punpcklqdq xmm0, xmm0' exactly,
> because the result (rval) must be in xmm0 for function return anyway.

I checked in

/* { dg-final { scan-assembler-times "punpcklqdq\[
\\t\]+%xmm\[0-9\]+,\[ \\t\]+%xmm\[0-9\]+" 1 } } */

It covers 'punpcklqdq xmm0, xmm0' and 'punpcklqdq xmm10, xmm0' .
There should be
only one punpcklqdq.

> Alexander
>
>> > +
>> > +#include <immintrin.h>
>> > +
>> > +__m128i
>> > +foo (long long val)
>> > +{
>> > +  __m128i rval = {val, val};
>> > +  return rval;
>> > +}
>> > --
>> > 2.17.2
>> >
>>
>


-- 
H.J.


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