From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18BB53858C56; Tue, 5 Mar 2024 02:21:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18BB53858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709605318; bh=lV3Uj/GGuELO9hOw6bXHjXCQiFEe57XNwzb6h+YhUnI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=e0bNJvVYDkzPL5HK09joY4RgaSVv6kDcmhB/YJx3TIlA893EIKMw7wUIVPvYl8Ils UOwnPoUi1p1nHndW6Gm8Meh9tVRZVmRYFPJ2ENfyPTlLzZRyf/6L0VqMB+1lKYf580 YEUSvZZTZiIH0NBvSDs7qLka9Mn9RHAeEMRgsqlo= From: "bruce at hoult dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114194] ICE when using std::unique_ptr with xtheadvector Date: Tue, 05 Mar 2024 02:21:57 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: bruce at hoult dot 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=3D114194 --- Comment #6 from Bruce Hoult --- The ICE also happens with bzero(). The ICE does NOT happen with a constant length of 16 of greater, in which c= ase a function call is made instead of expanding inline. With rv64gv or rv64gcv a series of N `sb` are generated (N < 16) With rv64gc_xtheadvector, N >=3D 6, and -Os a tail call to memset is genera= ted, no ICE. With N < 6 ... ICE. So the problem is only trying to expand memset() or bzero() inline. Does it= try to use a vectorised memset? That doesn't happen with rv64gcv. memcpy() does not ICE for any N. I assume the originally reported C++ code is generating a memset() to initialise one of the classes/structs.=