[Bug tree-optimization/106054] New: Tree optimizations cause mcf generates incorrect results

dizhao at os dot amperecomputing.com gcc-bugzilla@gcc.gnu.org
Wed Jun 22 09:03:54 GMT 2022


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

            Bug ID: 106054
           Summary: Tree optimizations cause mcf generates incorrect
                    results
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dizhao at os dot amperecomputing.com
  Target Milestone: ---

Created attachment 53189
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53189&action=edit
test code in C

Some tree optimization caused verification error on the spec2017 505.mcf test
case.

Attached is a small example I extracted, to help debugging the problem.
When compiled with "-std=c99 -O2 -funroll-loops -fdisable-tree-slp1" the result
is different with "-std=c99 -O2 -funroll-loops", the latter result is
incorrect. (It is possible the problem is not slp itself. I haven't figured out
the root cause by now.)

Tested on trunk commit: 98b6e62cf5e7d477b5797084da59561f6d018668 . And the
error seems to exist at least since trunk commit
a1c9f779f75283427316b5c670c1e01ff8ce9ced.

Thanks.


More information about the Gcc-bugs mailing list