mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
[LV/LoopAccesses] Backward dependences are not safe just because the
accesses are via different types Noticed this while generalizing the code for loop distribution. I confirmed with Arnold that this was indeed a bug and managed to create a testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230647 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -794,11 +794,10 @@ bool MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
|
||||
|
||||
assert(Val.isStrictlyPositive() && "Expect a positive value");
|
||||
|
||||
// Positive distance bigger than max vectorization factor.
|
||||
if (ATy != BTy) {
|
||||
DEBUG(dbgs() <<
|
||||
"LAA: ReadWrite-Write positive dependency with different types\n");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned Distance = (unsigned) Val.getZExtValue();
|
||||
@ -820,6 +819,7 @@ bool MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
|
||||
return true;
|
||||
}
|
||||
|
||||
// Positive distance bigger than max vectorization factor.
|
||||
MaxSafeDepDistBytes = Distance < MaxSafeDepDistBytes ?
|
||||
Distance : MaxSafeDepDistBytes;
|
||||
|
||||
|
Reference in New Issue
Block a user