public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tobi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/95859] [10/11 regression] Statically true asserts not recognized as such with -O2, but with -O1, -Og, -O3
Date: Mon, 05 Apr 2021 02:35:36 +0000	[thread overview]
Message-ID: <bug-95859-4-qWiGoAcBgm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95859-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 from Tobias Schlüter <tobi at gcc dot gnu.org> ---
I'm sorry to say that the problem is NOT fixed on the trunk.  With "ARM64 gcc
trunk" on the compiler explorer, we get the below.  OTOH 9.3 produces perfect
code.  Compiler explorer link: https://godbolt.org/z/56h67rfc4

.LC0:
        .string "Eigen::internal::variable_if_dynamic<T,
Value>::variable_if_dynamic(T) [with T = long int; int Value = 0]"
.LC1:
        .string
"/opt/compiler-explorer/libs/eigen/v3.3.9/Eigen/src/Core/util/XprHelper.h"
.LC2:
        .string "v == T(Value)"
.LC3:
        .string "Eigen::internal::variable_if_dynamic<T,
Value>::variable_if_dynamic(T) [with T = long int; int Value = 3]"
.LC4:
        .string "Eigen::internal::variable_if_dynamic<T,
Value>::variable_if_dynamic(T) [with T = long int; int Value = 4]"
.LC5:
        .string "Eigen::internal::variable_if_dynamic<T,
Value>::variable_if_dynamic(T) [with T = long int; int Value = 1]"
func34(m34):
        stp     x29, x30, [sp, -128]!
        mov     x1, 0
        mov     x29, sp
        stp     x19, x20, [sp, 16]
        mov     x20, x8
        mov     x19, x0
        add     x0, sp, 40
        bl      Eigen::internal::variable_if_dynamic<long,
0>::variable_if_dynamic(long) [complete object constructor]
        add     x0, sp, 41
        mov     x1, 0
        bl      Eigen::internal::variable_if_dynamic<long,
0>::variable_if_dynamic(long) [complete object constructor]
        str     x19, [sp, 48]
        add     x0, sp, 56
        mov     x1, 3
        bl      Eigen::internal::variable_if_dynamic<long,
3>::variable_if_dynamic(long) [complete object constructor]
        add     x0, sp, 57
        mov     x1, 4
        bl      Eigen::internal::variable_if_dynamic<long,
4>::variable_if_dynamic(long) [complete object constructor]
        add     x0, sp, 58
        mov     x1, 0
        bl      Eigen::internal::variable_if_dynamic<long,
0>::variable_if_dynamic(long) [complete object constructor]
        add     x0, sp, 59
        mov     x1, 0
        bl      Eigen::internal::variable_if_dynamic<long,
0>::variable_if_dynamic(long) [complete object constructor]
        str     x19, [sp, 80]
        add     x0, sp, 90
        mov     x1, 0
        bl      Eigen::internal::variable_if_dynamic<long,
0>::variable_if_dynamic(long) [complete object constructor]
        add     x0, sp, 91
        mov     x1, 0
        bl      Eigen::internal::variable_if_dynamic<long,
0>::variable_if_dynamic(long) [complete object constructor]
        str     x19, [sp, 112]
        add     x0, sp, 120
        mov     x1, 1
        bl      Eigen::internal::variable_if_dynamic<long,
1>::variable_if_dynamic(long) [complete object constructor]
        add     x0, sp, 121
        mov     x1, 4
        bl      Eigen::internal::variable_if_dynamic<long,
4>::variable_if_dynamic(long) [complete object constructor]
        str     x20, [sp, 64]
        add     x0, sp, 72
        mov     x1, 3
        bl      Eigen::internal::variable_if_dynamic<long,
3>::variable_if_dynamic(long) [complete object constructor]
        ldp     s18, s16, [x19]
        mov     x0, x20
        ldp     s4, s1, [x19, 8]
        ldp     s17, s6, [x19, 16]
        fcvt    d18, s18
        ldp     s3, s0, [x19, 24]
        fcvt    d16, s16
        ldp     s7, s5, [x19, 32]
        fcvt    d4, s4
        ldr     s2, [x19, 40]
        fcvt    d1, s1
        fcvt    d17, s17
        fcvt    d6, s6
        fcvt    d3, s3
        fcvt    d7, s7
        fcvt    d5, s5
        fcvt    d2, s2
        fcvt    d0, s0
        stp     d18, d17, [x20]
        stp     d7, d16, [x20, 16]
        stp     d6, d5, [x20, 32]
        stp     d4, d3, [x20, 48]
        stp     d2, d1, [x20, 64]
        str     d0, [x20, 80]
        ldr     s0, [x19, 44]
        fcvt    d0, s0
        str     d0, [x20, 88]
        ldp     x19, x20, [sp, 16]
        ldp     x29, x30, [sp], 128
        ret
_GLOBAL__sub_I_func34(m34):
        ret

  parent reply	other threads:[~2021-04-05  2:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24  7:28 [Bug rtl-optimization/95859] New: " tobi at gcc dot gnu.org
2020-06-24  7:51 ` [Bug ipa/95859] " rguenth at gcc dot gnu.org
2020-06-24 14:42 ` tobi at gcc dot gnu.org
2020-06-24 15:02 ` tobi at gcc dot gnu.org
2020-06-25  9:00 ` tobi at gcc dot gnu.org
2020-07-07  7:08 ` [Bug ipa/95859] [10/11 regression] " tobi at gcc dot gnu.org
2020-07-07  7:09 ` tobi at gcc dot gnu.org
2020-07-15  6:50 ` rguenth at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2020-07-25 12:37 ` tobi at gcc dot gnu.org
2020-10-12 12:53 ` rguenth at gcc dot gnu.org
2021-02-25 11:08 ` jakub at gcc dot gnu.org
2021-03-10 20:04 ` jakub at gcc dot gnu.org
2021-04-02  2:04 ` tobi at gcc dot gnu.org
2021-04-02  2:07 ` tobi at gcc dot gnu.org
2021-04-05  2:35 ` tobi at gcc dot gnu.org [this message]
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-06-29  2:39 ` [Bug ipa/95859] [10/11/12 " tobi at gcc dot gnu.org
2021-09-05 17:54 ` pinskia 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-95859-4-qWiGoAcBgm@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).