From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06EE03857C62; Mon, 5 Apr 2021 02:35:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06EE03857C62 From: "tobi at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: tobi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2021 02:35:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95859 --- Comment #13 from Tobias Schl=C3=BCter --- I'm sorry to say that the problem is NOT fixed on the trunk. With "ARM64 g= cc trunk" on the compiler explorer, we get the below. OTOH 9.3 produces perfe= ct code. Compiler explorer link: https://godbolt.org/z/56h67rfc4 .LC0: .string "Eigen::internal::variable_if_dynamic::variable_if_dynamic(T) [with T =3D long int; int Value =3D 0]" .LC1: .string "/opt/compiler-explorer/libs/eigen/v3.3.9/Eigen/src/Core/util/XprHelper.h" .LC2: .string "v =3D=3D T(Value)" .LC3: .string "Eigen::internal::variable_if_dynamic::variable_if_dynamic(T) [with T =3D long int; int Value =3D 3]" .LC4: .string "Eigen::internal::variable_if_dynamic::variable_if_dynamic(T) [with T =3D long int; int Value =3D 4]" .LC5: .string "Eigen::internal::variable_if_dynamic::variable_if_dynamic(T) [with T =3D long int; int Value =3D 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::variable_if_dynamic(long) [complete object constructor] add x0, sp, 41 mov x1, 0 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] str x19, [sp, 48] add x0, sp, 56 mov x1, 3 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] add x0, sp, 57 mov x1, 4 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] add x0, sp, 58 mov x1, 0 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] add x0, sp, 59 mov x1, 0 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] str x19, [sp, 80] add x0, sp, 90 mov x1, 0 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] add x0, sp, 91 mov x1, 0 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] str x19, [sp, 112] add x0, sp, 120 mov x1, 1 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] add x0, sp, 121 mov x1, 4 bl Eigen::internal::variable_if_dynamic::variable_if_dynamic(long) [complete object constructor] str x20, [sp, 64] add x0, sp, 72 mov x1, 3 bl Eigen::internal::variable_if_dynamic::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=