From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5ECA9384AB63; Wed, 8 May 2024 15:08:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5ECA9384AB63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715180915; bh=yknHjR3yD4gVqQk9Ltdcge8YJHAVL42oFKUko1SKQxY=; h=From:To:Subject:Date:From; b=NfoTIKrqMZobLTI1Nsrlk+wAiIi2Yc3SbB0wqvWwy44JypAJV3i87jGW9cdfAMA7M XzcsWQwfZydyVE8MJ6/keAMCyQOyZceCTnF4W0opG7WbAPd3cSdvhLPOYMFgTjOSD6 EFxLxbJWl/bsjyBFdj7RiVWbscImZ0uyv/MBNg1I= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/114988] New: RISC-V: ICE in intrinsic __riscv_vfwsub_wf_f32mf2 Date: Wed, 08 May 2024 15:08:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: juzhe.zhong at rivai dot ai 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 114988 Summary: RISC-V: ICE in intrinsic __riscv_vfwsub_wf_f32mf2 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: juzhe.zhong at rivai dot ai Target Milestone: --- https://godbolt.org/z/ncxrx3fK9 #include #include vfloat32mf2_t test_vfwsub_wf_f32mf2(vfloat32mf2_t vs2, _Float16 rs1, size_t= vl) { return __riscv_vfwsub_wf_f32mf2(vs2, rs1, vl); } with -march=3Drv64gcv -O3: :6:1: error: unrecognizable insn: 6 | } | ^ (insn 8 5 12 2 (set (reg:RVVMF2SF 134 [ ]) (if_then_else:RVVMF2SF (unspec:RVVMF64BI [ (const_vector:RVVMF64BI repeat [ (const_int 1 [0x1]) ]) (reg/v:DI 137 [ vl ]) (const_int 2 [0x2]) repeated x2 (const_int 0 [0]) (const_int 7 [0x7]) (reg:SI 66 vl) (reg:SI 67 vtype) (reg:SI 69 frm) ] UNSPEC_VPREDICATE) (minus:RVVMF2SF (reg/v:RVVMF2SF 135 [ vs2 ]) (float_extend:RVVMF2SF (vec_duplicate:RVVMF4HF (reg/v:HF 13= 6 [ rs1 ])))) (unspec:RVVMF2SF [ (reg:DI 0 zero) ] UNSPEC_VUNDEF))) "":5:10 -1 (nil)) FP16 vector need zvfh, so such intrinsic should be reported as illegal intrinsic in frontend instead of an ICE. with -rv64gcv_zvfh: It can be compiled: vsetvli zero,a0,e16,mf4,ta,ma vfwsub.wf v8,v8,fa0 ret=