From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F63B3858002; Thu, 14 Jan 2021 10:58:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F63B3858002 From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/98648] Failure to optimize out no-op vector operation using andnot Date: Thu, 14 Jan 2021 10:58:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ABI, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com 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: cc 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, 14 Jan 2021 10:58:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98648 Hongtao.liu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #2 from Hongtao.liu --- It looks like not an ABI issue, but gcc didn't simplify for vector all one = bits for floating point. .277r.combine Trying 6 -> 7: 6: r85:V4SF=3Dconst_vector 7: r84:V4SF=3D~r85:V4SF&r87:V4SF REG_DEAD r87:V4SF REG_DEAD r85:V4SF Failed to match this instruction: (set (reg:V4SF 84) (and:V4SF (reg:V4SF 87) (const_vector:V4SF [ (const_double:SF -QNaN [-QNaN]) repeated x4 ]))) When NAN is all ones(which is situation here), it should be simplified to (= set (reg:V4SF 84) (reg: V4SF 87))=