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)
commit7f3facb7e67a83583fddc4bc8fe9a7ed6d9f3956
tree0f49160d5b8b18f0ebbca01cac093948860f074a
parent4d10c239097d737e96d0c5e5eed96de0f3aa6409
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. =]

llvm-svn: 215054
llvm/utils/shuffle_fuzz.py [new file with mode: 0755]