From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8174 invoked by alias); 3 Jul 2013 08:56:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8125 invoked by uid 48); 3 Jul 2013 08:56:39 -0000 From: "vincenzo.innocente at cern dot ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/57796] New: AVX2 gather vectorization: code bloat and reduction of performance Date: Wed, 03 Jul 2013 08:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vincenzo.innocente at cern dot ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00146.txt.bz2 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