public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tnfchris at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/105219] [12 Regression] SVE: Wrong code with -O3 -msve-vector-bits=128 -mtune=thunderx
Date: Tue, 12 Apr 2022 11:36:35 +0000	[thread overview]
Message-ID: <bug-105219-4-JgIihgeHc0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105219-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
I have managed to find the commit where this starts failing:

commit 61fc5e098e76c9809f35f449a70c9c8d74773d9d (HEAD)
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Feb 18 11:34:52 2022 +0100

    tree-optimization/104582 - Simplify vectorizer cost API and fixes

    This simplifies the vectorizer cost API by providing overloads
    to add_stmt_cost and record_stmt_cost suitable for scalar stmt
    and branch stmt costing which do not need information like
    a vector type or alignment.  It also fixes two mistakes where
    costs for versioning tests were recorded as vector stmt rather
    than scalar stmt.

    This is a first patch to simplify the actual fix for PR104582.

    2022-02-18  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/104582
            * tree-vectorizer.h (add_stmt_cost): New overload.
            (record_stmt_cost): Likewise.
            * tree-vect-loop.cc (vect_compute_single_scalar_iteration_cost):
            Use add_stmt_costs.
            (vect_get_known_peeling_cost): Use new overloads.
            (vect_estimate_min_profitable_iters): Likewise.  Consistently
            use scalar_stmt for costing versioning checks.
            * tree-vect-stmts.cc (record_stmt_cost): New overload.

but I think this just exposes the issue.  The weird thing is while this does
change the cost calculations during vect the final vectorized code is exactly
the same out of both version. 

and indeed there's no change at all in the dumps until cunrolli, which in one
version unrolls more than the other, but I think that's just costing
difference. So I'm disabling it to continue seeing at which pass there's
actually codegen difference between these two commits.

  parent reply	other threads:[~2022-04-12 11:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 13:29 [Bug target/105219] New: " acoplan at gcc dot gnu.org
2022-04-11 15:56 ` [Bug target/105219] " tnfchris at gcc dot gnu.org
2022-04-11 16:02 ` ktkachov at gcc dot gnu.org
2022-04-11 16:05 ` acoplan at gcc dot gnu.org
2022-04-11 16:12 ` tnfchris at gcc dot gnu.org
2022-04-12 11:08 ` tnfchris at gcc dot gnu.org
2022-04-12 11:30 ` rguenth at gcc dot gnu.org
2022-04-12 11:36 ` tnfchris at gcc dot gnu.org [this message]
2022-04-12 12:20 ` tnfchris at gcc dot gnu.org
2022-04-13 11:34 ` tnfchris at gcc dot gnu.org
2022-04-13 13:48 ` tnfchris at gcc dot gnu.org
2022-04-20  7:07 ` rguenth at gcc dot gnu.org
2022-04-25  7:07 ` tnfchris at gcc dot gnu.org
2022-04-27 11:56 ` [Bug tree-optimization/105219] " marxin at gcc dot gnu.org
2022-04-27 12:02 ` rguenth at gcc dot gnu.org
2022-04-27 12:06 ` rsandifo at gcc dot gnu.org
2022-04-27 12:27 ` rguenth at gcc dot gnu.org
2022-04-27 12:30 ` rguenth at gcc dot gnu.org
2022-04-27 13:44 ` avieira at gcc dot gnu.org
2022-04-28  8:10 ` cvs-commit at gcc dot gnu.org
2022-04-28  8:10 ` rguenth at gcc dot gnu.org
2022-04-28 12:17 ` rguenth at gcc dot gnu.org
2022-04-29 15:32 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105219-4-JgIihgeHc0@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).