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

            Bug ID: 124039
           Summary: [16 Regression] 401.bzip2 miscompares with -O3 on
                    Intel Ice Lake since r16-7324-g856ba1d7f786b0
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pheeck at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
            Blocks: 26163
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Running the 401.bzip2 SPEC 2006 benchmark with -O3 -march=native on an Intel
Ice Lake (3rd generation Xeon) machine results in a miscompare:

****************************************
Contents of chicken.jpg.err
****************************************

(null): Data integrity error when decompressing.

****************************************

****************************************
Contents of input.combined.err
****************************************

(null): Data integrity error when decompressing.

****************************************

****************************************
Contents of input.source.err
****************************************

(null): Data integrity error when decompressing.

****************************************

****************************************
Contents of input.program.err
****************************************

(null): Data integrity error when decompressing.

****************************************

****************************************
Contents of text.html.err
****************************************

(null): Data integrity error when decompressing.

****************************************

*** Miscompare of chicken.jpg.out; for details see
   
/home/gcc/buildworker/source/cpu2006/benchspec/CPU2006/401.bzip2/run/run_peak_ref_amd64-m64-mine.0000/chicken.jpg.out.mis
'chicken.jpg.out' short


I bisected this to r16-7324-g856ba1d7f786b0

commit 856ba1d7f786b0b5e53042e292296391ae1b0da4
Author: Richard Biener <[email protected]>
Date:   Thu Feb 5 11:09:59 2026 +0100

    tree-optimization/123983 - only update IV on the requested edge

    The following reverts back to only updating the IV after the
    vectorized loop on the requested edge which avoids disrupting
    live value vectorization.

            PR tree-optimization/123983
            * tree-vect-loop-manip.cc (vect_update_ivs_after_vectorizer):
            Only update the PHI argument on the requested edge.

            * gcc.dg/vect/vect-pr123983.c: New testcase.

 gcc/testsuite/gcc.dg/vect/vect-pr123983.c | 28 ++++++++++++++++++++++++++++
 gcc/tree-vect-loop-manip.cc               | 16 ++--------------
 2 files changed, 30 insertions(+), 14 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/vect/vect-pr123983.c


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

Reply via email to