public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "meissner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/104136] New: Gcc cannot compile wrf_r for power10 using -Ofast
Date: Wed, 19 Jan 2022 23:58:49 +0000	[thread overview]
Message-ID: <bug-104136-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 104136
           Summary: Gcc cannot compile wrf_r for power10 using -Ofast
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: meissner at gcc dot gnu.org
  Target Milestone: ---

Using the current trunk compiler (from January 18th, 2022), I cannot compile
the module_advect_em fortran module with either -Ofast or -O3 using my normal
spec build options.  The reason is GCC generates a conditional jump
instruction, and the label is too far away.  This means the length insn
attribute is incorrect for one or more instructions, and GCC believes it does
not have to reverse the conditional jump. 

If I disable the generation of vector constants using the XXSPLTIW instruction
via -mno-splat-word-constant option, the module compiles fine.  Enabling or
disabling the XXSPLTIDP instruction with -mno-splat-float-constant does not
affect whether the file can be compiled, only disabling XXSPLTIW.

I used the following options build the module:
-g -Ofast -mcpu=power10 -finline-arg-packing \
-static-libgfortran -fstack-arrays -std=legacy \
-frandom-seed=spec2017 -fconvert=big-endian \
-fno-range-check -fcray-pointer

With those options, there are 646 XXSPLTIW instructions generated and 558
XXSPLTIDP instructions generated.  The size of the
__module_advect_em_MOD_advect_scalar function is 335,440 bytes.

             reply	other threads:[~2022-01-19 23:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 23:58 meissner at gcc dot gnu.org [this message]
2022-01-20  0:00 ` [Bug target/104136] " meissner at gcc dot gnu.org
2022-01-20 18:27 ` meissner at gcc dot gnu.org
2022-01-20 19:48 ` meissner at gcc dot gnu.org
2022-01-21 19:51 ` meissner at gcc dot gnu.org
2022-01-21 23:09 ` cvs-commit at gcc dot gnu.org
2022-01-22  2:34 ` meissner at gcc dot gnu.org
2022-01-22  2:35 ` meissner 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-104136-4@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).