[PATCH] D132960: [InstCombine] Transform small unaligned memcmp calls used in zero equality tests
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 08:58:38 PDT 2022
nikic added a comment.
In D132960#3761412 <https://reviews.llvm.org/D132960#3761412>, @msebor wrote:
> In D132960#3759601 <https://reviews.llvm.org/D132960#3759601>, @efriedma wrote:
>
>> To be clear, this is proposing to replace a memcmp of 8 bytes with up to 16 byte-sized loads on targets with strict alignment? That seems excessive to me.
>
> No, the patch doesn't change the size limit (the size of a scalar register, or 8 on all the targets I tested). It just removes the restriction on alignment and size being a power of two.
The point here is that these loads are going to be expanded into 16 byte-sized loads by the backend, if the target has strict alignment. See https://llvm.godbolt.org/z/MdqoEEv1P for an example.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132960/new/
https://reviews.llvm.org/D132960
More information about the llvm-commits
mailing list