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

            Bug ID: 104762
           Summary: x86_64 538.imagick_r 8%-28% regressions after
                    r12-7319-g90d693bdc9d718
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
            Blocks: 26163
  Target Milestone: ---
              Host: x86_64-linux
            Target: x86_64-linux

Around 22nd of February 2022, SPEC 2017 538.imagick_r regressed on all
x86_64 systems used by our periodic benchmarker.  I have bisected the
zen3 -Ofast -march=native -flto case to revision
r12-7319-g90d693bdc9d718 but I think most if not all of the
regressions are caused by this:

commit 90d693bdc9d71841f51d68826ffa5bd685d7f0bc
Author: Richard Biener <rguent...@suse.de>
Date:   Fri Feb 18 14:32:14 2022 +0100

    target/99881 - x86 vector cost of CTOR from integer regs

    This uses the now passed SLP node to the vectorizer costing hook
    to adjust vector construction costs for the cost of moving an
    integer component from a GPR to a vector register when that's
    required for building a vector from components.  A cruical difference
    here is whether the component is loaded from memory or extracted
    from a vector register as in those cases no intermediate GPR is involved.

    The pr99881.c testcase can be Un-XFAILed with this patch, the
    pr91446.c testcase now produces scalar code which looks superior
    to me so I've adjusted it as well.


List of (selected) regressions with links to LNT graphs:

zen2 -O2 regressed by 26%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=297.507.0

zen2 -O2 -flto regressed by 26% too:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=296.507.0

zen2 -Ofast -march=native by 28%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=295.507.0

zen2 -Ofast -march=native -flto by 23:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=287.507.0


zen3 -O2 by 8%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=470.507.0

zen3 -O2 -march=native by 18%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=472.507.0

zen3 -Ofast -march=native by 17%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=471.507.0

zen3 -Ofast -march=native -flto by 10%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=475.507.0


kabylake -O2 by 9%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=226.507.0
(though this one looks suspiciously noisy)

kabylake -O2 -march=native by 16%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=28.507.0

kabylake -Ofast -march=native by 22%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=32.507.0

kabylake -Ofast -march=native -flto by 15%:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=11.507.0


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