From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 037FE3858D35; Fri, 1 Mar 2024 21:08:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 037FE3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709327333; bh=d/epdhkIudQWi44j4Z3IUfzpiDOsGym8vZL+heVqtPs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cSuSNpsNNpyUWoxG7VzSJxdToxnLIyNZ7yhYaYMyjTCiXsaVvcPEiVZo4yAGUzaVe QNKwWjhmHYyi3hLH6szCyAhet5+X1wVQwEe+7qLIwEqFXEZCopHbhmjX708HHtU6GZ cUmXNYUZ4umEENpOQBdzQoGo/VSUuEr2728TJYZY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/114190] wrong code with -O2 -fno-dce -fharden-compares -mvpclmulqdq --param=max-rtl-if-conversion-unpredictable-cost=136 Date: Fri, 01 Mar 2024 21:08:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on component 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114190 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2024-03-01 Component|target |rtl-optimization --- Comment #3 from Andrew Pinski --- cmpelim produces: ``` (insn 22 21 486 2 (set (reg:CCZ 17 flags) (compare:CCZ (reg:SI 4 si [orig:111 _21+4 ] [111]) (const_int 0 [0]))) "/app/example.cpp":8:8 discrim 1 7 {*cmpsi_ccno_1} (expr_list:REG_UNUSED (reg:CCZ 17 flags) (nil))) (insn 486 22 466 2 (set (reg:DI 1 dx [353]) (plus:DI (reg/f:DI 7 sp) (const_int 212 [0xd4]))) "/app/example.cpp":8:65 discrim 1 254 {*leadi} (nil)) (insn 466 486 383 2 (set (reg:DI 4 si [354]) (const:DI (plus:DI (symbol_ref:DI ("u") [flags 0x2] ) (const_int 1 [0x1])))) "/app/example.cpp":8:65 discrim 1 84 {*movdi_internal} (expr_list:REG_EQUIV (const:DI (plus:DI (symbol_ref:DI ("u") [flags 0x= 2]=20 ) (const_int 1 [0x1]))) (nil))) (insn 383 466 384 2 (set (reg:DI 1 dx [348]) (if_then_else:DI (eq (reg:CCZ 17 flags) (const_int 0 [0])) (reg:DI 1 dx [353]) (reg:DI 4 si [354]))) "/app/example.cpp":8:65 discrim 1 1451 {*movdicc_noc} (expr_list:REG_DEAD (reg:CCZ 17 flags) (expr_list:REG_DEAD (reg:DI 4 si [354]) (nil)))) ``` Which is fine (but note the REG_UNUSED note which was not updated). >From pro_and_epilogue's dump: deleting insn with uid =3D 22. Which is totally bogus; I think someone didn't redo REG_UNUSED notes again.=