[all-commits] [llvm/llvm-project] ef8445: [DAGCombiner] Be more careful about looking throug...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue May 7 21:18:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ef84452571b8e8f4a38a173e6adf6a5ecbbde97e
https://github.com/llvm/llvm-project/commit/ef84452571b8e8f4a38a173e6adf6a5ecbbde97e
Author: Craig Topper <craig.topper at sifive.com>
Date: 2024-05-07 (Tue, 07 May 2024)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/AArch64/pr90936.ll
Log Message:
-----------
[DAGCombiner] Be more careful about looking through extends and truncates in mergeTruncStores. (#91375)
Previously we recursively looked through extends and truncates on both
SourceValue and WideVal.
SourceValue is the largest source found for each of the stores we are
combining. WideVal is the source for the current store.
Previously we could incorrectly look through a (zext (trunc X)) pair and
incorrectly believe X to be a good source.
I think we could also look through a zext on one store and a sext on
another store and arbitrarily pick one of the extends as the final
source.
With this patch we only look through one level of extend or truncate.
And we don't look through extends/truncs on both SourceValue and WideVal
at the same time.
This may lose some optimization cases, but keeps everything we had tests
for.
Fixes #90936.
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