[AMDGPU] stop image_store being moved illegally
Summary:
A recent change
321556: AMDGPU: Remove mayLoad/hasSideEffects from MIMG stores
can allow the machine instruction scheduler to move an image store past
an image load using the same descriptor.
V2: Fixed by marking image ops as mayAlias and isAliased. This may be
overly conservative, and we may need to revisit.
V3: Reverted test change done on 321556.
Reviewers: arsenm, nhaehnle, dstuttard
Subscribers: llvm-commits, t-tye, yaxunl, wdng, kzhuravl
Differential Revision: https://reviews.llvm.org/D41969
llvm-svn: 322419
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
index 02e63f0..63875c5 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
@@ -50,15 +50,11 @@
}
bool isAliased(const MachineFrameInfo *) const override {
- // FIXME: If we ever change image intrinsics to accept fat pointers, then
- // this could be true for some cases.
- return false;
+ return true;
}
bool mayAlias(const MachineFrameInfo *) const override {
- // FIXME: If we ever change image intrinsics to accept fat pointers, then
- // this could be true for some cases.
- return false;
+ return true;
}
};