Add a vector shuffle fuzzer.
authorChandler Carruth <chandlerc@gmail.com>
Thu, 7 Aug 2014 04:13:51 +0000 (04:13 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 7 Aug 2014 04:13:51 +0000 (04:13 +0000)
commit81dfaefc4c10d841957c928873b77cacb458c6c9
tree8161f36c8be2037f6b578ff865bb0103dd553331
parent971bf283f8c9759cbbc2a28944af9637e1a65748
Add a vector shuffle fuzzer.

This is a python script which for a given seed generates a random
sequence of random shuffles of a random vector width. It embeds this
into a function and emits a main function which calls the test routine
and checks that the results (where defined) match the obvious results.

I'll be using this to drive out miscompiles from the new vector shuffle
logic now that it is clean of any crashes I can find with llvm-stress.

Note, my python skills are very poor. Sorry if this is terrible code,
and feel free to tell me how I should write this or just patch it as
necessary.

The tests generated try to be very portable and use boring C routines.
It technically will mis-declare the C routines and pass 32-bit integers
to parametrs that expect 64-bit integers. If someone wants to fix this
and has less terrible ideas of how to do it, I'm all ears. Fortunately,
this "just works" for x86. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215054 91177308-0d34-0410-b5e6-96231b3b80d8
utils/shuffle_fuzz.py [new file with mode: 0755]