In SIInstrInfo::areMemAccessesTriviallyDisjoint, the current implementation ignored the offset when creates MemoryLocation
for alias analysis, and thus may report wrong result when offset is not zero. This patch fixes the issue.
Details
Diff Detail
Event Timeline
lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
2218–2232 | Why can't you use MI.mayAlias and delete this? |
lib/Target/AMDGPU/SIInstrInfo.cpp | ||
---|---|---|
2218–2232 | This intends to fix a bug in an application. We can use MI.mayAlias and delete areMemAccessesTriviallyDisjoint. |
Use MachineInstr::mayAlias to replace areMemAccessesTriviallyDisjoint in LoadStoreOptimizer pass.
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | ||
---|---|---|
264–265 ↗ | (On Diff #187273) | This merged part of the other patch |
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | ||
---|---|---|
264–265 ↗ | (On Diff #187273) | What do you mean here? I think this is the staring point of the current patch. We are going to replace |
Why can't you use MI.mayAlias and delete this?