[llvm] r238918 - AVX-512: VSHUFPD instruction selection - code improvements

Chandler Carruth chandlerc at google.com
Tue Jun 23 23:55:44 PDT 2015

On Tue, Jun 23, 2015 at 11:24 PM Demikhovsky, Elena <
elena.demikhovsky at intel.com> wrote:

>  Hi Chandler,
>           >>  I re-generated the previously deleted test file
> test/CodeGen/X86/vector-shuffle-512-v8.ll and put it back into repository.
>          > I don't understand why you are continuing to use the *other
> tests* though?
>  *The vector**-shuffle-512-v16.ll has only 4 tests. How do I check all
> other patterns without “other tests”?*
By adding patterns for the other tests?

You can look at vector-shuffle-{128,256}-v16.ll for ideas. If you write the
test IR with no FileCheck lines at all, running the update script will add
them for you.

>  >>As far I understand, the vector-shuffle-512-v8.ll does not check
> correctness of the shuffles, it just checks that noting fails.
> > That is pretty clearly not the case. The test is checking for specific
> instruction sequences on each pattern.
> >>And it should be re-generated after each optimization, right?
> > Yes, and most specifically the diff should show exactly what the change
> entailed.
> *What about **vector-shuffle-512-v32.ll? You don’t want to generate 32!
> permutations, right?*
Certainly not. We don't have 32! permutations in vector-shuffle-256-v32.ll
for example. The patterns should focus on common and basic patterns that
you would expect programmers to want to write, and on specific tests of
functionality in the vector shuffle lowering.

As an example, when we added support for advanced rotate and shift based
lowerings, we added lots of patterns that exercise boundary conditions and
interesting properties of rotates and shifts.

You can collect coverage for X86ISelLowering.cpp from running the
particular tests and look at that to get ideas of missing patterns. Or you
can do this the brute-force way by dropping asserts into various paths in
the lowering code you're adding and making sure you hit them with the tests
in the file.

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

More information about the llvm-commits mailing list