AMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions
authorTom Stellard <tstellar@redhat.com>
Mon, 29 Jul 2019 16:40:58 +0000 (16:40 +0000)
committerTom Stellard <tstellar@redhat.com>
Mon, 29 Jul 2019 16:40:58 +0000 (16:40 +0000)
commitcc0bc941d4ebd0275fe206d78f395822258e73bc
treeddd01e5c0899c0c6c5144f0e8c83f47e9c287a53
parent899bdaa8c29d9100759e63e9be52897e4dbb37d9
AMDGPU/LoadStoreOptimizer: combine MMOs when merging instructions

Summary:
The LoadStoreOptimizer was creating instructions with 2
MachineMemOperands, which meant they were assumed to alias with all other instructions,
because MachineInstr:mayAlias() returns true when an instruction has multiple
MachineMemOperands.

This was preventing these instructions from being merged again, and was
giving the scheduler less freedom to reorder them.

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65036

llvm-svn: 367237
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
llvm/test/CodeGen/AMDGPU/merge-load-store.mir
llvm/test/CodeGen/MIR/AMDGPU/load-store-opt-dlc.mir