projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
456177b
)
AMDGPU/SI: Fix bug in SIInstrInfo::insertWaitStates() uncovered by r268260
author
Tom Stellard
<thomas.stellard@amd.com>
Mon, 2 May 2016 18:02:24 +0000
(18:02 +0000)
committer
Tom Stellard
<thomas.stellard@amd.com>
Mon, 2 May 2016 18:02:24 +0000
(18:02 +0000)
We can't use MI->getDebugLoc() when MI is an iterator that could be
MBB.end().
llvm-svn: 268265
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index
eb17ffe
..
f5cd065
100644
(file)
--- a/
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@
-806,6
+806,7
@@
unsigned SIInstrInfo::calculateLDSSpillAddress(MachineBasicBlock &MBB,
void SIInstrInfo::insertWaitStates(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI,
int Count) const {
+ DebugLoc DL = MBB.findDebugLoc(MI);
while (Count > 0) {
int Arg;
if (Count >= 8)
@@
-813,7
+814,7
@@
void SIInstrInfo::insertWaitStates(MachineBasicBlock &MBB,
else
Arg = Count - 1;
Count -= 8;
- BuildMI(MBB, MI,
MI->getDebugLoc()
, get(AMDGPU::S_NOP))
+ BuildMI(MBB, MI,
DL
, get(AMDGPU::S_NOP))
.addImm(Arg);
}
}