From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5846F38708F9; Mon, 13 May 2024 14:59:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5846F38708F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715612350; bh=PGvX7z1Cu7FJUQzMfkrwm8vIkY5RIZepu99l+QrM2Oo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Db8Bq4wode9oygEbrdQBKi93w3srPk4JhjuCwDkKntlI3EYRS6ZGE8AOIcilhIvuR 8aDPWfkJaE915eeLSaQcPRwaJOoLimfyKAiXg4p/dQ7CyXLudDFK71vLD9oH9FVmnd U+AP8Tbmq+ZGj6z4P0LmPGdxPmHy0R9zUyq6rHpU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114988] RISC-V: ICE in intrinsic __riscv_vfwsub_wf_f32mf2 Date: Mon, 13 May 2024 14:59:09 +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: 14.0 X-Bugzilla-Keywords: diagnostic, ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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: 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=3D114988 --- Comment #4 from GCC Commits --- The master branch has been updated by Pan Li : https://gcc.gnu.org/g:41b3cf262e61aee9d26380f1c820e0eaae740f50 commit r15-435-g41b3cf262e61aee9d26380f1c820e0eaae740f50 Author: Pan Li Date: Sat May 11 15:25:28 2024 +0800 RISC-V: Bugfix ICE for RVV intrinisc vfw on _Float16 scalar For the vfw vx format RVV intrinsic, the scalar type _Float16 also requires the zvfh extension. Unfortunately, we only check the vector tree type and miss the scalar _Float16 type checking. For example: vfloat32mf2_t test_vfwsub_wf_f32mf2(vfloat32mf2_t vs2, _Float16 rs1, si= ze_t vl) { return __riscv_vfwsub_wf_f32mf2(vs2, rs1, vl); } It should report some error message like zvfh extension is required instead of ICE for unreg insn. This patch would like to make up such kind of validation for _Float16 in the RVV intrinsic API. It will report some error like below when there is no zvfh enabled. error: built-in function '__riscv_vfwsub_wf_f32mf2(vs2, rs1, vl)' requires the zvfhmin or zvfh ISA extension Passed the rv64gcv fully regression tests, included c/c++/fortran. PR target/114988 gcc/ChangeLog: * config/riscv/riscv-vector-builtins.cc (validate_instance_type_required_extensions): New func impl to validate the intrinisc func type ops. (expand_builtin): Validate instance type before expand. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/pr114988-1.c: New test. * gcc.target/riscv/rvv/base/pr114988-2.c: New test. Signed-off-by: Pan Li =