From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 66D37383FB99; Thu, 15 Sep 2022 11:40:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66D37383FB99 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663242028; bh=QVJJ0paJWc3QuQ3o+7/TBtyhTt/r9CLF12RdLPijqxY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LVFFQMGth4opYc2Yx8SVEeoxrG5PA3qFu40romcENU8e/z7NUkw4NHZpuVgyDL1Sk QXxhmZH4REPMRB6tpk+hVKjr55KJZwgrkbRAgA2wJudFXSdkwTOz0IeRt4PQEM5LRU /NtLfGuHED9EZcECHg9K6YEpSXwpWfXuXZo6kPjs= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106910] roundss not vectorized Date: Thu, 15 Sep 2022 11:40:28 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenther at suse dot de 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=3D106910 --- Comment #5 from rguenther at suse dot de --- On Thu, 15 Sep 2022, crazylht at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106910 >=20 > --- Comment #4 from Hongtao.liu --- >=20 > > The vectorizer would go the direct internal fn way for those, querying = the > > floor optab but the x86 backend only has scalar modes supported for the > > rounding optabs. > For CFN_BUILT_IN_ICEIL, the modifier is narrow, and currently vectorizabl= e_call > require op_in and op_out to be simple_integer_narrowing, which means it f= ails > to go the direct internal fn way. >=20 > ---------cut from vectorizable_call----------- > tree_code convert_code =3D ERROR_MARK; > if (cfn !=3D CFN_LAST > && (modifier =3D=3D NONE > || (modifier =3D=3D NARROW > && simple_integer_narrowing (vectype_out, vectype_in, > &convert_code)))) > ifn =3D vectorizable_internal_function (cfn, callee, vectype_out, > vectype_in); > -----------cut end---------------------- >=20 > Similar for CFN_BUILT_IN_LCEIL under 32-bit target. > For 64-bit target CFN_BUILT_IN_LCEIL, CFN_BUILT_IN_LLCEIL will go the dir= ect > internal fn way, add lceilmn2 expanders works. >=20 > Not sure whether vectorizable_call should be extended or just leave > CFN_BUILT_IN_ICEIL/IFLOOR/IRINT/IROUND part in > ix86_builtin_vectorized_function. I think this is a known issue (we may even have a bugreport) so I'd leave handling of those cases in ix86_builtin_vectorized_function.=