https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94212

            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=48054&action=edit
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, which
is probably the trigger for this bug.

Reply via email to