[llvm] r271575 - AMDGPU: Handle flat in getMemOpBaseRegImmOfs
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 13:05:20 PDT 2016
Author: arsenm
Date: Thu Jun 2 15:05:20 2016
New Revision: 271575
URL: http://llvm.org/viewvc/llvm-project?rev=271575&view=rev
Log:
AMDGPU: Handle flat in getMemOpBaseRegImmOfs
It can still report the base register, and the uses give up when it
fails.
Modified:
llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp?rev=271575&r1=271574&r2=271575&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIInstrInfo.cpp Thu Jun 2 15:05:20 2016
@@ -287,6 +287,13 @@ bool SIInstrInfo::getMemOpBaseRegImmOfs(
return true;
}
+ if (isFLAT(*LdSt)) {
+ const MachineOperand *AddrReg = getNamedOperand(*LdSt, AMDGPU::OpName::addr);
+ BaseReg = AddrReg->getReg();
+ Offset = 0;
+ return true;
+ }
+
return false;
}
More information about the llvm-commits
mailing list