-
Notifications
You must be signed in to change notification settings - Fork 28
Validating LLVM with random programs
Jeff Bush edited this page Apr 8, 2017
·
17 revisions
-
Add build directory to path
export PATH=.../NyuziToolchain/build/bin:$PATH
-
Generate random stream
llvm-stress -size 1000 -o stress.ll
-
Run test
llc -o - stress.ll
If this fails, isolate the failure using instructions in Debugging Backend Crashes with bugpoint
The following script will run this in a loop:
#!/bin/bash
while :
do
SEED=$((65536*$RANDOM+$RANDOM))
FNAME=stress$SEED.ll
echo "Test $FNAME"
llvm-stress -seed=$SEED -o $FNAME -size=1000
llc $FNAME
if [ $? -eq 0 ]; then
echo "PASS"
else
echo "FAIL!"
echo $FNAME >> failure-list.txt
fi
done