mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
LoopVectorize: Add support for write-only loops when the write destination is a single pointer.
Speedup SciMark by 1% git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167035 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1348,6 +1348,13 @@ bool LoopVectorizationLegality::canVectorizeMemory(BasicBlock &BB) {
|
||||
Reads.push_back(Ptr);
|
||||
}
|
||||
|
||||
// If we write (or read-write) to a single destination and there are no
|
||||
// other reads in this loop then is it safe to vectorize.
|
||||
if (ReadWrites.size() == 1 && Reads.size() == 0) {
|
||||
DEBUG(dbgs() << "LV: Found a write-only loop!\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
// Now that the pointers are in two lists (Reads and ReadWrites), we
|
||||
// can check that there are no conflicts between each of the writes and
|
||||
// between the writes to the reads.
|
||||
|
Reference in New Issue
Block a user