[PATCH] D26367: Fix DAGCombiner match
Evgeny Stupachenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 7 12:50:45 PST 2016
evstupac created this revision.
evstupac added reviewers: aschwaighofer, RKSimon, hfinkel.
evstupac added a subscriber: llvm-commits.
evstupac set the repository for this revision to rL LLVM.
The patches fix (base, index, offset) match in DAGCombine to combine the following stores/loads (a, b, c char arrays):
for (i = 0; i < n; i += 2) {
char c1 = c{*b];
char c2 = c[*b + 1];
a[i] = c1;
a[i + 1] = c2;
b++;
}
into (a, c, the same short arrays):
for (i = 0; i < n; i++) {
short c1 = c{*b];
a[i] = c1;
b++;
}
Without the patch match returned the following (base, index, offset):
*(a + i) -> (a, i, 0)
*(a + i + 1) -> (a + i, undef, 1)
and loads/stores were not combined because of different base.
Repository:
rL LLVM
https://reviews.llvm.org/D26367
Files:
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/MergeConsecutiveStores.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26367.77081.patch
Type: text/x-patch
Size: 5372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161107/f8cfad68/attachment.bin>
More information about the llvm-commits
mailing list