From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1565 invoked by alias); 25 Sep 2013 13:06:49 -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 1520 invoked by uid 48); 25 Sep 2013 13:06:46 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/58529] New: Loop 30% faster with Intel than with GCC Date: Wed, 25 Sep 2013 13:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org 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 keywords bug_severity priority component assigned_to reporter cf_gcchost attachments.created 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-09/txt/msg01776.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58529 Bug ID: 58529 Summary: Loop 30% faster with Intel than with GCC Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Host: x86-64-gnu-linux Created attachment 30893 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30893&action=edit Test file The Intel icpc 13.1.1 compiler generates code which is 30% faster than GCC 4.9 for the following function (see test2.cc): the_bins_size = 0; for (int i = 0; i < arraylength; i++) { if (coordexist[i]) { the_bins[the_bins_size] = i; coordexist[i] = the_bins_size++; } } GCC: real 0m2.493s user 0m2.491s sys 0m0.002s -funroll-loops GCC: real 0m1.494s user 0m1.493s sys 0m0.000s ICC: real 0m1.160s user 0m1.157s sys 0m0.001s The main function (test.main.cc) has been compiled with g++; used system: Intel(R) Xeon(R) CPU E5-2630, CentOS 6/x86-64-gnu-linux, glibc-2.12. g++ -march=native -fno-rtti -fno-exceptions -Ofast -std=c++ icpc -O3 -no-prec-div -xHost -fno-rtti -fno-exceptions