268
by Pekka Jääskeläinen
Tagged the slowest test with a 'long' keyword. |
1 |
AT_BANNER([llvmopencl passes tests]) |
2 |
||
3 |
AT_SETUP([LoopBarriers pass]) |
|
4 |
AT_KEYWORDS([llvmopencl]) |
|
5 |
# Skip this group until pass ordering stabilizes. |
|
6 |
AT_CHECK([exit 77]) |
|
7 |
for i in $abs_top_srcdir/tests/loopbarriers*_input.ll |
|
8 |
do
|
|
9 |
input=`echo $i | sed 's/.*\///'` |
|
10 |
golden=`echo $input | sed s/_input.ll/_golden.ll/` |
|
11 |
output=`echo $input | sed s/_input.ll/_output.ll/` |
|
12 |
reapply=`echo $input | sed s/_input.ll/_reapply.ll/` |
|
13 |
echo "input=$input" |
|
14 |
echo "output=$output" |
|
15 |
echo "golden=$golden" |
|
16 |
echo "reapply=$reapply" |
|
17 |
cp $abs_top_srcdir/tests/$input . |
|
18 |
cp $abs_top_srcdir/tests/$golden . |
|
19 |
AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -loop-barriers -S -o $output $input]) |
|
20 |
AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -loop-barriers -loop-barriers -S -o $reapply $input]) |
|
21 |
AT_CHECK([cmp $output $golden]) |
|
22 |
AT_CHECK([cmp $reapply $output]) |
|
23 |
done
|
|
24 |
AT_CLEANUP
|
|
25 |
||
26 |
AT_SETUP([CanonicalizeBarriers pass]) |
|
27 |
AT_KEYWORDS([llvmopencl]) |
|
28 |
# Skip this group until pass ordering stabilizes. |
|
29 |
AT_CHECK([exit 77]) |
|
30 |
for i in $abs_top_srcdir/tests/barriers*_input.ll |
|
31 |
do
|
|
32 |
input=`echo $i | sed 's/.*\///'` |
|
33 |
golden=`echo $input | sed s/_input.ll/_golden.ll/` |
|
34 |
output=`echo $input | sed s/_input.ll/_output.ll/` |
|
35 |
reapply=`echo $input | sed s/_input.ll/_reapply.ll/` |
|
36 |
echo "input=$input" |
|
37 |
echo "output=$output" |
|
38 |
echo "golden=$golden" |
|
39 |
echo "reapply=$reapply" |
|
40 |
cp $abs_top_srcdir/tests/$input . |
|
41 |
cp $abs_top_srcdir/tests/$golden . |
|
42 |
AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -barriers -S -o $output $input]) |
|
43 |
AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -barriers -barriers -S -o $reapply $input]) |
|
44 |
AT_CHECK([cmp $output $golden]) |
|
45 |
AT_CHECK([cmp $reapply $output]) |
|
46 |
done
|
|
47 |
AT_CLEANUP
|
|
48 |
||
49 |
AT_SETUP([BarrierTailReplication pass]) |
|
50 |
AT_KEYWORDS([llvmopencl]) |
|
51 |
# Skip this group until pass ordering stabilizes. |
|
52 |
AT_CHECK([exit 77]) |
|
53 |
for i in $abs_top_srcdir/tests/barriertails*_input.ll |
|
54 |
do
|
|
55 |
input=`echo $i | sed 's/.*\///'` |
|
56 |
golden=`echo $input | sed s/_input.ll/_golden.ll/` |
|
57 |
output=`echo $input | sed s/_input.ll/_output.ll/` |
|
58 |
reapply=`echo $input | sed s/_input.ll/_reapply.ll/` |
|
59 |
echo "input=$input" |
|
60 |
echo "output=$output" |
|
61 |
echo "golden=$golden" |
|
62 |
echo "reapply=$reapply" |
|
63 |
cp $abs_top_srcdir/tests/$input . |
|
64 |
cp $abs_top_srcdir/tests/$golden . |
|
65 |
AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -barriertails -S -o $output $input]) |
|
66 |
AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -barriertails -barriertails -S -o $reapply $input]) |
|
67 |
AT_CHECK([cmp $output $golden]) |
|
68 |
AT_CHECK([cmp $reapply $output]) |
|
69 |
done
|
|
70 |
AT_CLEANUP
|
|
71 |
||
72 |
AT_SETUP([Pass composition]) |
|
73 |
AT_KEYWORDS([llvmopencl]) |
|
74 |
# Skip this group until pass ordering stabilizes. |
|
75 |
AT_CHECK([exit 77]) |
|
76 |
for type in btr loops barriers workitem |
|
77 |
do
|
|
78 |
for i in $abs_top_srcdir/tests/*_$type.ll |
|
79 |
do
|
|
80 |
golden=`echo $i | sed 's/.*\///' | sed s/.ll/_golden.ll/` |
|
81 |
input=`echo $golden | sed s/_${type}_golden.ll/.ll/` |
|
82 |
output=`echo $golden | sed s/_golden.ll/_output.ll/` |
|
83 |
echo "input=$input" |
|
84 |
echo "output=$output" |
|
85 |
echo "golden=$golden" |
|
86 |
cp $i $golden |
|
87 |
cp $abs_top_srcdir/tests/$input . |
|
88 |
case $type in |
|
89 |
btr) AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -barriertails -S -o $output $input], 0, ignore, ignore) ;; |
|
90 |
loops) AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -loop-simplify -loop-barriers -S -o $output $input], 0, ignore, ignore) ;; |
|
91 |
barriers) AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -barriers -S -o $output $input], 0, ignore, ignore) ;; |
|
92 |
workitem) AT_CHECK([opt -load $abs_top_builddir/lib/llvmopencl/.libs/llvmopencl.so -verify-dom-info -verify-loop-info -workitem -local-size=2 2 2 -S -o $output $input], 0, ignore, ignore) ;; |
|
93 |
esac
|
|
94 |
AT_CHECK([cmp $output $golden]) |
|
95 |
done
|
|
96 |
done
|
|
97 |
AT_CLEANUP
|