From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 08AEB3858D33; Thu, 18 Jan 2024 17:41:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08AEB3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705599703; bh=SyDRRi3+tL1ikVuAvsVN28U1awdzZaP4M382ycKZnFQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DJN9ySto4fVdF5p++ouniTWPCi/8O76eTrQYJ3rczogF8B7bDAxQixoMcM8oS0XFh zR+FpYp16upFjpR1n+yJRHTJhEVaU4w2SI0fdifxjPqEegrPiao8gYFuEcWWu+4SFz cC8VGlFheJhfbMMV2OI9Bd7MbwCMIwHEgO1U4iWg= From: "xxs_chy at outlook dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113487] Missed optimization:simplify demanded bits on multi-use instructions like select Date: Thu, 18 Jan 2024 17:41:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: xxs_chy at outlook dot com 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: 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=3D113487 --- Comment #2 from XChy --- I may miss something here... Apart from this one, it seems that GCC doesn't simplify **one-use** instruction based on demanded bits too: https://godbolt.org/z/67bYxd8hY But LLVM indeed handle the one-use case.=