From: "Martin Storsjö" Subject: Re: [PATCH] msvcrt: Avoid disallowed unaligned writes in memset on ARM Message-Id: Date: Fri, 17 Sep 2021 23:19:51 +0300 (EEST) In-Reply-To: References: <20210915202745.3661089-1-martin@martin.st> <00876200-ab90-e23e-86e5-df022b6b0199@gmail.com> On Thu, 16 Sep 2021, Martin Storsjö wrote: > On Thu, 16 Sep 2021, Martin Storsjö wrote: > >> Clang doesn't seem to know/exploit that the regular 32 bit store >> instructions work unaligned though, so the smaller stores get exploded into >> a long series of single byte writes. But I guess that's just a missed >> optimization opportunity in Clang, I'll see if I can report it. > > FWIW this seems to be a target specific issue; Clang does optimize it > correctly for an armv7-linux-gnueabihf target, but not for armv7-windows. > I'll see about getting that fixed. For the record, this should have been fixed in Clang now: https://reviews.llvm.org/D109960 // Martin