[all-commits] [llvm/llvm-project] b2784e: Revert "[X86] For minsize memset/memcpy, use byte ...
Hans via All-commits
all-commits at lists.llvm.org
Mon Oct 7 06:25:58 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b2784ec32837df38e0de7436cbde6dfa7aefacd1
https://github.com/llvm/llvm-project/commit/b2784ec32837df38e0de7436cbde6dfa7aefacd1
Author: Hans Wennborg <hans at chromium.org>
Date: 2024-10-07 (Mon, 07 Oct 2024)
Changed paths:
M llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
M llvm/test/CodeGen/X86/memcpy-struct-by-value.ll
M llvm/test/CodeGen/X86/memcpy.ll
M llvm/test/CodeGen/X86/memset-minsize.ll
M llvm/test/CodeGen/X86/memset-vs-memset-inline.ll
Log Message:
-----------
Revert "[X86] For minsize memset/memcpy, use byte or double-word accesses (#87003)"
This caused assertion failures:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7736:
SDValue getMemsetValue(SDValue, EVT, SelectionDAG &, const SDLoc &):
Assertion `C->getAPIntValue().getBitWidth() == 8' failed.
See comment on the PR for a reproducer.
> repstosb and repstosd are the same size, but stosd is only done for 0
> because the process of multiplying the constant so that it is copied
> across the bytes of the 32-bit number adds extra instructions that cause
> the size to increase. For 0, repstosb and repstosd are the same size,
> but stosd is only done for 0 because the process of multiplying the
> constant so that it is copied across the bytes of the 32-bit number adds
> extra instructions that cause the size to increase. For 0, we do not
> need to do that at all.
>
> For memcpy, the same goes, and as a result the minsize check was moved
> ahead because a jmp to memcpy encoded takes more bytes than repmovsb.
This reverts commit 6de5305b3d7a4a19a29b35d481a8090e2a6d3a7e.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list