AMDGPU: Fix dropping mem operands when moving to VALU
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 29 Aug 2015 06:48:46 +0000 (06:48 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 29 Aug 2015 06:48:46 +0000 (06:48 +0000)
commit0601263423d363129ac9b8c21b967b9ed07f5a2e
tree69226e79358e1e5fdbecdbf8a32474c784c51c7f
parent127a3d74f1d49cd4f1b1b92a49649e60c857ad50
AMDGPU: Fix dropping mem operands when moving to VALU

Without a memory operand, mayLoad or mayStore instructions
are treated as hasUnorderedMemRef, which results in much worse
scheduling.

We really should have a verifier check that any
non-side effecting mayLoad or mayStore has a memory operand.
There are a few instructions (interp and images) which I'm
not sure what / where to add these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246356 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIInstrInfo.cpp
test/CodeGen/AMDGPU/drop-mem-operand-move-smrd.ll [new file with mode: 0644]