From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 89C523858D20; Fri, 31 Mar 2023 07:19:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89C523858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680247159; bh=1MdJfE7C/1oQhTdjDLgK6OuYXywnY5TpfeieJVXobLg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=q0T052RA1I9Tn4YXcdZzrdJ0SRWDHUw7LDwRVvqmc0tTYiOJfHu/rUQt/DSdYiF3+ T5CNvsFXSSXhX3bVIRb64XFW0Ha9UJFk1EFjwK7xK2uNptAoF2H33mIcwojH79Yxgo kesoQexHJadHw52avjE170sCw2Tx8TLW4RVsBFOs= 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 07:19:19 +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 #9 from Hongtao.liu --- (In reply to Hongtao.liu from comment #8) > >=20 > > One solution is handling it in ix86_builtin_vectorized_function just li= ke > > other math functions which has different input/output sizes. >=20 > Or extend vectorizable_call to handle NARROW/WIDEN cases when output of i= fn > is same-sized vector integer of vectype_in, and do NARROW/WIDEN between > ifn_output and vectype_out. >=20 > 3472 /* For now, we only vectorize functions if a target specific built= in > 3473 is available. TODO -- in some cases, it might be profitable to > 3474 insert the calls for pieces of the vector, in order to be able > 3475 to vectorize other operations in the loop. */ > 3476 fndecl =3D NULL_TREE; > 3477 internal_fn ifn =3D IFN_LAST; > 3478 tree callee =3D gimple_call_fndecl (stmt); > 3479 > 3480 /* First try using an internal function. */ > 3481 tree_code convert_code =3D ERROR_MARK; Another alternative it's we can recognize signbit as shift in the vectorize= r.=