From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 14DB73858CDA; Fri, 31 Mar 2023 05:52:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14DB73858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680241934; bh=T8FwHlo+LgKJaj8xWlN+weqQ5kHXZ0mqwUP43FOtiXQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Fqa5fJWuDcpyi6ZaW4Maau+mfq2o8jMQs4cpWkebogrtvuFrzb0qYTA/7PmMDmBS7 DBL8u3UUC2OKwXUzb5cVPEBItGAQ8xFmNeO+S00RDQ9K6SDT1nt05E/NcKkMhwuVRc Zq/MmM2+gqp4ewpPJYI948w7xrG8IF522r3Xb61I= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109029] __builtin_signbit for 64bit fp does not vectorize Date: Fri, 31 Mar 2023 05:52:13 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: crazylht at gmail 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=3D109029 --- Comment #7 from Hongtao.liu --- (In reply to Hongtao.liu from comment #6) > (In reply to Hongtao.liu from comment #5) > > We need to support signbit2 for vector double/_Float16. Also simi= lar > > like popcnt, there's a mismatch of input and output between builtin and > > signbit_optab, it could be handled in vectorizer pattern match. >=20 > After support signbit{v2df,v4df,v8df}2, vectorizer still failed, currentl= y, > we only support simple integer narrowing, but not for v4df->v8si. >=20 > 3480 /* First try using an internal function. */ > 3481 tree_code convert_code =3D ERROR_MARK; > 3482 if (cfn !=3D CFN_LAST > 3483 && (modifier =3D=3D NONE > 3484 || (modifier =3D=3D NARROW > 3485 && simple_integer_narrowing (vectype_out, vectype_in, > 3486 &convert_code)))) > 3487 ifn =3D vectorizable_internal_function (cfn, callee, vectype_out, > 3488 vectype_in); > 3489 One solution is handling it in ix86_builtin_vectorized_function just like o= ther math functions which has different input/output sizes.=