-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-linux-glibc-clang.sh
executable file
·23 lines (23 loc) · 1.01 KB
/
test-linux-glibc-clang.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
set -e
sde=$(which sde64 || which sde)
clang -o test-fma-linux-glibc-clang test-fma.c -lm
clang -o test-fma-linux-glibc-clang-mfma -O2 -mfma test-fma.c -lm
clang -o contract-linux-glibc-clang -O2 -mfma contract.c -lm
resultfile=result-linux-glibc-clang.txt
clang --version > $resultfile
echo "---" >> $resultfile
echo "Linux glibc + clang default / Ivy Bridge" >> $resultfile
$sde -ivb -- ./test-fma-linux-glibc-clang >> $resultfile
echo "---" >> $resultfile
echo "Linux glibc + clang default / Haswell" >> $resultfile
$sde -hsw -- ./test-fma-linux-glibc-clang >> $resultfile
echo "---" >> $resultfile
echo "Linux glibc + clang -O2 -mfma / Ivy Bridge" >> $resultfile
($sde -ivb -- ./test-fma-linux-glibc-clang-mfma || true) >> $resultfile 2>&1
echo "---" >> $resultfile
echo "Linux glibc + clang -O2 -mfma / Haswell" >> $resultfile
$sde -hsw -- ./test-fma-linux-glibc-clang-mfma >> $resultfile
echo "---" >> $resultfile
echo "#pragma STDC FP_CONTRACT" >> $resultfile
$sde -hsw -- ./contract-linux-glibc-clang >> $resultfile