llvm.org GIT mirror llvm / c8256c4
R600/SI: Report offset in correct units for st64 DS instructions Need to convert the 64 element offset into bytes, not just the element size like the normal case instructions. Noticed by inspection. This can't be hit now because st64 instructions aren't emitted during instruction selection, and the post-RA scheduler isn't enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217560 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Arsenault 6 years ago
1 changed file(s) with 15 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
160160 return false;
161161 }
162162
163 static bool isStride64(unsigned Opc) {
164 switch (Opc) {
165 case AMDGPU::DS_READ2ST64_B32:
166 case AMDGPU::DS_READ2ST64_B64:
167 case AMDGPU::DS_WRITE2ST64_B32:
168 case AMDGPU::DS_WRITE2ST64_B64:
169 return true;
170 default:
171 return false;
172 }
173 }
174
163175 bool SIInstrInfo::getLdStBaseRegImmOfs(MachineInstr *LdSt,
164176 unsigned &BaseReg, unsigned &Offset,
165177 const TargetRegisterInfo *TRI) const {
201213 int Data0Idx = AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::data0);
202214 EltSize = getOpRegClass(*LdSt, Data0Idx)->getSize();
203215 }
216
217 if (isStride64(Opc))
218 EltSize *= 64;
204219
205220 const MachineOperand *AddrReg = getNamedOperand(*LdSt,
206221 AMDGPU::OpName::addr);