From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AC2D43857826; Thu, 15 Sep 2022 09:35:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC2D43857826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663234534; bh=ipwD+Dpi4HTMeEz3O93ugVhh2FB0DonsEUGcC61BDDM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gjPIstrpgEZEt3PRb5ujEg8qZG3glBkBJhx4WhRlsq+KWn6+9VZH4gRGNbnlG5KK+ Xe12e7wE3UxkVJMGMweJW9X0NJJSI/th3DIZ94i4TW0xUlKIo19sXjEdsQFE9iaBY9 H1n/p7i6fOqqmGhDQbjZMQ1SWK7FbDql01UhOmCA= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106910] roundss not vectorized Date: Thu, 15 Sep 2022 09:35:34 +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: 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=3D106910 --- Comment #4 from Hongtao.liu --- > 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 vectorizable_= call require op_in and op_out to be simple_integer_narrowing, which means it fai= ls to go the direct internal fn way. ---------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---------------------- 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 direct internal fn way, add lceilmn2 expanders works. Not sure whether vectorizable_call should be extended or just leave CFN_BUILT_IN_ICEIL/IFLOOR/IRINT/IROUND part in ix86_builtin_vectorized_function.=