[PATCH] [X86][AVX2] Missing AVX2 memory folding instructions

Nadav Rotem nrotem at apple.com
Mon Feb 9 11:44:53 PST 2015


> On Feb 9, 2015, at 10:03 AM, Simon Pilgrim <llvm-dev at redking.me.uk> wrote:
> 
> In http://reviews.llvm.org/D7492#120487, @mkuper wrote:
> 
>> What bothers me a bit is that all of the pre-existing broadcast instructions have TB_NO_REVERSE, and the new ones don't.
>> Unfortunately I can't remember *why* they have TB_NO_REVERSE.
> 
> 
> I believe its because the VBROADCASTS{SD}rr register instructions were an AVX2 addition while the VBROADCASTS{SD}rm memory instructions were available from AVX1 - so it prevents unfolding from introducing an illegal instruction on AVX1 targets. The VPBROADCAST instructions are all AVX2 instructions so don't need an equivalent limitation.

Oh yea, that’s right. Thanks Simon! AVX1 only has broadcast from memory, and the in-register broadcasts were added later.   It sounds like the right reason. I bet that if we remove NO_REVERSE flags the test suite will fail due to this reason. 

> 
> Nadav might be able to confirm?

I don’t remember making this change but svn claims I did (together with Michael Kuperstein) here:  http://llvm.org/viewvc/llvm-project?view=revision&revision=160230 <http://llvm.org/viewvc/llvm-project?view=revision&revision=160230>

> 
> 
> REPOSITORY
>  rL LLVM
> 
> http://reviews.llvm.org/D7492
> 
> EMAIL PREFERENCES
>  http://reviews.llvm.org/settings/panel/emailpreferences/
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/b46ac69d/attachment.html>


More information about the llvm-commits mailing list