From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C2BD385841E; Thu, 29 Jun 2023 15:13:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C2BD385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688051637; bh=z0il/R2H64IigSrmoJdGQUdYGzuLwc7R50WyieLo25g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IL/rSKQn+5KKKVr8gxdheAVWKFO7OSroFRKHmnsoHSw67Kok+vMJJW0Gsl+zwiz4i u2nd/rrEu/lSD4tRYHAhzulh5StraJiUtDX7TE4r5F7J1pD2QACSVhHNLsEKswn2vI BvUSBisvn0Mj5mDXBlG3kkrcL6mr1mTHiLjdJD4E= From: "ryanpholt at me dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110472] 60% slowdown with fwrapv when using openmp Date: Thu, 29 Jun 2023 15:13:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: missed-optimization, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: ryanpholt at me dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110472 --- Comment #2 from Ryan Holt --- (In reply to Andrew Pinski from comment #1) > I think it is just wrong iv-opt choices. >=20 > Works just fine on aarch64-linux-gnu too: > ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2 > -fopenmp > ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo > time: 15.191220 > ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2 > -fopenmp -fwrapv > ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo > time: 18.854280 > ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo > time: 16.705876 > ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ~/upstream-gcc/bin/gcc t4.c -O2 > -fopenmp > ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo > time: 17.491387 > ubuntu@ubuntu:~/src/upstream-gcc-aarch64\# ./a.out ;echo > time: 17.519264 I forgot to explicitly call out that I can only reproduce the big speedup without fwrapv when compiling with -O3. I noticed you were using O2 on aarch64-linux-gnu.=