Hi Nadav,<div><br></div><div>Great tool!</div><div><br></div><div>Attached is a relatively small patch to add random vector types.</div><div><br></div><div>Thanks,</div><div>Joey</div><div><br><div class="gmail_quote">On 26 February 2012 11:51, Rotem, Nadav <span dir="ltr"><<a href="mailto:nadav.rotem@intel.com">nadav.rotem@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Compiling lots of 'junk' helps in catching bugs.  I added a new tool (located under llvm/tools/llvm-stress) for generating random LL files.  The tool can be used to test different llvm components using various compilation flags.  Until now, I only found bugs in the codegen, and not in general llvm optimizations. This probably means that the generated tests are currently too simple for the higher-level optimizations.<br>

<br>
The command line below generates a random ll file, and llc compiles this file. It often crashes.<br>
<br>
./llvm-stress -seed $RANDOM -o tmp.ll -size 1000 ; ./llc tmp.ll -mcpu=corei7-avx -mattr=+avx -o /dev/null<br>
<br>
The "-seed" flag sets the initial seed to be used by the random function.  I implemented a simple portable 'random' function so that the result should be identical on all platforms. The initial seed also appears in the name of the generated function.  The "-size" parameter sets the size of the generated random file.<br>

<br>
Nadav<br>
---------------------------------------------------------------------<br>
Intel Israel (74) Limited<br>
<br>
This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>