[PATCH] [X86] Add HasAVX512 patterns for SS SSE intrinsics.

Demikhovsky, Elena elena.demikhovsky at intel.com
Thu May 21 06:17:57 PDT 2015


Hi,

We encountered with another problem - some sse intrinsics don't work on AVX-512 mode at all, due to UseAVX prefix.
I'm going to fix this, just to let these intrinsics be mapped to AVX instructions.

But I agree, as a long term solution, all these intrinsics should be mapped to AVX-512 instructions. And it is not only scalar FP. SKX covers all AVX and AVX2 instructions with EVEX version.

I'm against writing all this manually, it will be the last option. I'll think how all this mapping may be auto-generated.

-  Elena


-----Original Message-----
From: Ahmed Bougacha [mailto:ahmed.bougacha at gmail.com] 
Sent: Friday, May 08, 2015 01:58
To: ahmed.bougacha at gmail.com; anemet at apple.com; Demikhovsky, Elena
Cc: qcolombet at apple.com; llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] [X86] Add HasAVX512 patterns for SS SSE intrinsics.

In http://reviews.llvm.org/D9362#168427, @qcolombet wrote:

> >   I don't think that we should add all SSE intrinsics to AVX512 now.
>
>
> I kind of disagree.
>  When AVX512 is available we have additional registers we can use for those. I believe we should do the same thing as we do for thumb, i.e., choose the most permissive instruction encoding then shorten the encoding if possible (like the Thumb2SizeReduction pass).


I agree, this seems like the way to go;  see http://llvm.org/bugs/show_bug.cgi?id=23376.

> For the long term we may want to find a better solution for such case (same instruction available with different encoding based on extension) to avoid the explosion in size of the description.


I also agree.  In fact I think there are two orthogonal issues here:

- like I proposed earlier, we should use IntrinsicsInfo for scalar intrinsics.  I filed https://llvm.org/bugs/show_bug.cgi?id=23449
- in lots of cases, the main difference between SSE/AVX/AVX512 instructions is the encoding.  Due to the way the backend evolved, they're mostly apart, with lots of duplications (now it's even worse because AVX512 is in a completely different file).  There's room for refactoring, I think, but that's a big change.

I can repurpose this review to implement the first one, if people agree?  Also, if the second makes sense, I'll file a PR as well.

-Ahmed

> What do you think?

> 

> Cheers,

> -Quentin



http://reviews.llvm.org/D9362

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/


---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the llvm-commits mailing list