[all-commits] [llvm/llvm-project] 3ad239: [DAGCombiner] Refactor and improve ReduceLoadOpSto...
Björn Pettersson via All-commits
all-commits at lists.llvm.org
Mon Dec 16 03:15:33 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3ad2399148953837622d78d18ae9fd0db6ad0557
https://github.com/llvm/llvm-project/commit/3ad2399148953837622d78d18ae9fd0db6ad0557
Author: Björn Pettersson <bjorn.a.pettersson at ericsson.com>
Date: 2024-12-16 (Mon, 16 Dec 2024)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/ARM/dagcombine-ld-op-st.ll
M llvm/test/CodeGen/X86/apx/or.ll
M llvm/test/CodeGen/X86/illegal-bitfield-loadstore.ll
M llvm/test/CodeGen/X86/pr35763.ll
M llvm/test/CodeGen/X86/store_op_load_fold.ll
Log Message:
-----------
[DAGCombiner] Refactor and improve ReduceLoadOpStoreWidth (#119564)
This patch make a couple of improvements to ReduceLoadOpStoreWidth.
When determining the minimum size of "NewBW" we now take byte boundaries
into account. If we for example touch bits 6-10 we shouldn't accept
NewBW=8, because we would fail later when detecting that we can't access
bits from two different bytes in memory using a single load. Instead we
make sure to align LSB/MSB according to byte size boundaries up front
before searching for a viable "NewBW".
In the past we only tried to find a "ShAmt" that was a multiple of
"NewBW", but now we use a sliding window technique to scan for a viable
"ShAmt" that is a multiple of the byte size. This can help out finding
more opportunities for optimization (specially if the original type
isn't byte sized, and for big-endian targets when the original
load/store is aligned on the most significant bit).
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