From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6FDAD3858417; Wed, 29 May 2024 19:01:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FDAD3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717009312; bh=PCwv/THSr3QtEn9ixED+rhk2j31drTCE35vNk/1Ro28=; h=From:To:Subject:Date:In-Reply-To:References:From; b=daTHleCxefjySxYjyEQmh+BGxmLYXa6+jFSyOU395PWHiuEfTuL8Bllr33ux5zZf5 +bLzh+ETE58gXvM5kIhCJuAAwMHUk6HuHWXiF58JHq0IMUn7n7kVt58mUqR1pVr3xq VCVXDWBjNBRnDcicRr7b780Rk10gY1glv4/IXuoc= From: "noloader at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/84508] Load of misaligned address using _mm_load_sd Date: Wed, 29 May 2024 19:01:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 6.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: noloader at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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=3D84508 --- Comment #23 from Jeffrey Walton --- (In reply to Peter Cordes from comment #22) > [...] > That instruction is useless and should never be used in asm except for > code-alignment reasons (1 byte longer than MOVLPS, same length as MOVSD, = all > three doing the same thing for the memory-destination form). But easy to > imagine some code using that intrinsic to store an unaligned double into a > byte buffer. Reading from and writing to a [unaligned] byte stream in 4 or 8 byte chunks= is our use case. Eventually, we need to perform traditional SIMD processing. B= ut the loads and stores have to occur using these old instrinsics due to the w= ord types, data stream format and supported ISA's. I believe the other option is to memcpy the byte stream into a properly ali= gned intermediate buffer. But that could incur a performance hit if the optimizer misses the opportunity (and fails to elide the memcpy).=