public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikael at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/90608] Inline non-scalar minloc/maxloc calls
Date: Wed, 25 Oct 2023 17:02:26 +0000	[thread overview]
Message-ID: <bug-90608-4-Brbwkum7HQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-90608-4@http.gcc.gnu.org/bugzilla/>

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

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56094|0                           |1
        is obsolete|                            |

--- Comment #14 from Mikael Morin <mikael at gcc dot gnu.org> ---
Created attachment 56313
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56313&action=edit
inline minloc with mask

This patch adds support for {min,max}loc with mask.
It is not 100% testsuite clean as there are (runtime) error messages that
regress slightly for maxloc_bounds_{4,5,6,7}.f90


(In reply to Mikael Morin from comment #11)
> 
> > The problem could be with the initialization of loop iteration variables.
> > (...)
> > Unfortunately, this conditional initialization seems to
> > confuse the optimizers a lot.
> > 
> On closer look, the conditional initialization doesn't seem to be that
> confusing (at least in the problematic case), as it's removed early (ccp1)
> in the pipeline.  The loop iteration variables remain initialized with phis,
> but that's because of the loops.

Unfortunately, this is true for rank 1 arrays, but not for higher ranks.
Constant values are slowly propagated to the phi arguments as optimization
passes are run, but no simplification of the control flow happens as soon as
multiple loop levels are involved.

Need to look into the dim argument next.

  parent reply	other threads:[~2023-10-25 17:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-90608-4@http.gcc.gnu.org/bugzilla/>
2023-09-27 15:45 ` tnfchris at gcc dot gnu.org
2023-09-28 17:48 ` tkoenig at gcc dot gnu.org
2023-10-11 11:48 ` mikael at gcc dot gnu.org
2023-10-11 12:09 ` tnfchris at gcc dot gnu.org
2023-10-11 16:30 ` mikael at gcc dot gnu.org
2023-10-12 11:41 ` mikael at gcc dot gnu.org
2023-10-16 10:30 ` tnfchris at gcc dot gnu.org
2023-10-16 12:49 ` mikael at gcc dot gnu.org
2023-10-25 17:02 ` mikael at gcc dot gnu.org [this message]
2023-10-25 17:05 ` tnfchris at gcc dot gnu.org
2023-11-26 19:04 ` mikael at gcc dot gnu.org
2023-11-26 20:16 ` anlauf at gcc dot gnu.org
2024-01-10 17:39 ` tnfchris at gcc dot gnu.org
2024-07-05 10:14 ` tnfchris at gcc dot gnu.org
2024-07-23  6:57 ` tnfchris at gcc dot gnu.org
2024-07-23 20:09 ` mikael at gcc dot gnu.org
2024-07-24 19:17 ` tnfchris at gcc dot gnu.org
2024-07-31 20:12 ` mikael at gcc dot gnu.org
2024-08-01  9:04 ` tnfchris at gcc dot gnu.org
2024-09-21 16:34 ` cvs-commit at gcc dot gnu.org
2024-09-21 16:34 ` cvs-commit at gcc dot gnu.org
2024-09-21 16:34 ` cvs-commit at gcc dot gnu.org
2024-09-21 16:34 ` cvs-commit at gcc dot gnu.org
2024-09-21 16:35 ` cvs-commit at gcc dot gnu.org
2024-09-21 16:35 ` cvs-commit at gcc dot gnu.org
2024-09-21 16:35 ` cvs-commit at gcc dot gnu.org
2024-09-21 16:35 ` 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-90608-4-Brbwkum7HQ@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).