From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F2B43942010; Wed, 18 Mar 2020 12:41:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F2B43942010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584535298; bh=GQ3j3bm+hVNa6zD4YlnCOiIWZpvgWlQNMOvbXEO6kcE=; h=From:To:Subject:Date:From; b=rbsrr+tSVQlgPhOXaUmzFCM/uBqZgylvxkUAz64ghYSX857Ovq2tG10MfjWahZdIM Ht/XPZ2FasHQXFbAydGRzaCP18lAYA4jfuDA1O2JFBtYTWiBYqZnGjv+ZhoUR8TuL6 X131jK6T2w/qaMZfssuihaXdZmhOob54GPoZavQI= From: "dpochepk at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/94212] New: [AARCH64] [Regression] Incorrect vectorization of loop with FP calculations Date: Wed, 18 Mar 2020 12:41:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: tree-ssa X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dpochepk at gmail 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2020 12:41:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94212 Bug ID: 94212 Summary: [AARCH64] [Regression] Incorrect vectorization of loop with FP calculations Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dpochepk at gmail dot com Target Milestone: --- Created attachment 48054 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48054&action=3Dedit example application returning different result for O3 and O2 Example application (FP polynomial loop calculations) gives different result for O2 and O3 optimizations. Different is 1 ulp, so it might be some kind of rounding error (unsafe math leaked?). "-O3 -fno-tree-vectorize" gives correct result. This issue seems to affect aarch64-only (at least x86_64 is fine). Tried several gcc versions: trunk: affected gcc8.3: affected gcc7.4: not affected (I haven't investigated assembly) Example application is in attachment. Method "foo" has vectorized loop, whi= ch is probably the trigger for this bug.=