http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57796
Bug ID: 57796
Summary: AVX2 gather vectorization: code bloat and reduction of
performance
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: vincenzo.innocente at cern dot ch
At least in scimark2 sparse matrix multiplication the use of gather
instructions ends in code bloat and a substantial reduction of performance
the test below has been performed on a INTEL 4770K at fixed freq of 3.495GHz
using gcc version 4.9.0 20130630 (experimental) [trunk revision 200570] (GCC)
the easiest is just to download scimark2 compile and run as
mkdir scimark2TMP
cd scimark2TMP
wget http://math.nist.gov/scimark2/scimark2_1c.zip .
unzip scimark2_1c.zip
gcc -v
gcc -Ofast -march=corei7-avx *.c -lm
./a.out 5 | grep "Sparse matmult"
./a.out -large 5 | grep "Sparse matmult"
gcc -Ofast -march=corei7-avx -mavx2 -mfma *.c -lm
./a.out 5 | grep "Sparse matmult"
./a.out -large 5 | grep "Sparse matmult"
gcc -Ofast -march=corei7-avx -S SparseCompRow.c -o SparseCompRow_avx.s
gcc -Ofast -march=corei7-avx -mavx2 -mfma -S SparseCompRow.c -o
SparseCompRow_avx2.s
wc SparseCompRow_avx.s
wc SparseCompRow_avx2.s
my results
gcc version 4.9.0 20130630 (experimental) [trunk revision 200570] (GCC)
Sparse matmult Mflops: 2245.34 (N=1000, nz=5000)
Sparse matmult Mflops: 2030.24 (N=100000, nz=1000000)
Sparse matmult Mflops: 1842.84 (N=1000, nz=5000)
Sparse matmult Mflops: 1754.18 (N=100000, nz=1000000)
113 269 2156 SparseCompRow_avx.s
289 778 5910 SparseCompRow_avx2.s