From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8755F385BF81; Thu, 16 Apr 2020 12:10:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8755F385BF81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587039012; bh=bOmguTuWSo9rd17/uJF48VklpiNfUsI5TqeLLnkQ0ho=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hzQcRdaL4OsT+D2EazQHUvjznT7amMEJx6opDYrHX1WjELkZ79CfQSuKXDXjv93j5 WrnjQ/FYz2JoA88enJ0PRuSvl0vcKazCtVXhGUfD+7dmv5Q0EtJTqY8aruRER+Nhjz mNbbLQfGsBPe/n5HVeWM54MzrC+BTZXRYq0k6UHY= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94617] Simple if condition not optimized Date: Thu, 16 Apr 2020 12:10:12 +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: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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 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: Thu, 16 Apr 2020 12:10:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94617 --- Comment #3 from Richard Biener --- Note the RTL if-conversion pass doesn't recognize what we present to it. If you alter initial RTL expansion via -fno-tree-ter (not recommended in general) we produce a more 1:1 translation of the code as _Z16vanilla_bandpassiiiPKcS0_: .LFB0: .cfi_startproc movl %esi, %r9d cmpl %edx, %edi setle %sil cmpl %r9d, %edx setl %al testb %al, %sil movq %rcx, %rax cmovne %r8, %rax ret which I wouldn't expect to execute faster though.=