mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Add alignment value to allowsUnalignedMemoryAccess
Rename to allowsMisalignedMemoryAccess. On R600, 8 and 16 byte accesses are mostly OK with 4-byte alignment, and don't need to be split into multiple accesses. Vector loads with an alignment of the element type are not uncommon in OpenCL code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3810,7 +3810,7 @@ static bool FindOptimalMemOpLowering(std::vector<EVT> &MemOps,
|
||||
if (VT == MVT::Other) {
|
||||
unsigned AS = 0;
|
||||
if (DstAlign >= TLI.getDataLayout()->getPointerPrefAlignment(AS) ||
|
||||
TLI.allowsUnalignedMemoryAccesses(VT, AS)) {
|
||||
TLI.allowsMisalignedMemoryAccesses(VT, AS, DstAlign)) {
|
||||
VT = TLI.getPointerTy();
|
||||
} else {
|
||||
switch (DstAlign & 7) {
|
||||
@@ -3870,7 +3870,7 @@ static bool FindOptimalMemOpLowering(std::vector<EVT> &MemOps,
|
||||
unsigned AS = 0;
|
||||
if (NumMemOps && AllowOverlap &&
|
||||
VTSize >= 8 && NewVTSize < Size &&
|
||||
TLI.allowsUnalignedMemoryAccesses(VT, AS, &Fast) && Fast)
|
||||
TLI.allowsMisalignedMemoryAccesses(VT, AS, DstAlign, &Fast) && Fast)
|
||||
VTSize = Size;
|
||||
else {
|
||||
VT = NewVT;
|
||||
|
||||
Reference in New Issue
Block a user