summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-09-03 15:22:39 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-09-03 15:22:39 +0000
commitb8b841366a9927e509dc67702cf6a2ff1e5be68e (patch)
treea072183035ab6b5fd5b2943dad0d1fdc8fdeace5 /llvm
parent805b44d12436dc62be5c293af95110f9ded1ca7a (diff)
downloadbcm5719-llvm-b8b841366a9927e509dc67702cf6a2ff1e5be68e.tar.gz
bcm5719-llvm-b8b841366a9927e509dc67702cf6a2ff1e5be68e.zip
R600/SI: Fix typos in SIInstrInfo::areLoadsFromSameBasePtr()
This fixes a crash in the OpenCV test: ImgprocWarpResizeArea/Resize.Mat/16 There is no test case for this, because this failure depends on a specific ordering of the loads, which could easily change. llvm-svn: 217040
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/R600/SIInstrInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/R600/SIInstrInfo.cpp b/llvm/lib/Target/R600/SIInstrInfo.cpp
index 43efb71a2a2..6b8a36b7cc7 100644
--- a/llvm/lib/Target/R600/SIInstrInfo.cpp
+++ b/llvm/lib/Target/R600/SIInstrInfo.cpp
@@ -70,7 +70,7 @@ static bool nodesHaveSameOperandValue(SDNode *N0, SDNode* N1, unsigned OpName) {
--Op0Idx;
--Op1Idx;
- return N0->getOperand(Op0Idx) == N0->getOperand(Op1Idx);
+ return N0->getOperand(Op0Idx) == N1->getOperand(Op1Idx);
}
bool SIInstrInfo::areLoadsFromSameBasePtr(SDNode *Load0, SDNode *Load1,
@@ -131,7 +131,7 @@ bool SIInstrInfo::areLoadsFromSameBasePtr(SDNode *Load0, SDNode *Load1,
if (!nodesHaveSameOperandValue(Load0, Load1, AMDGPU::OpName::soffset) ||
findChainOperand(Load0) != findChainOperand(Load1) ||
!nodesHaveSameOperandValue(Load0, Load1, AMDGPU::OpName::vaddr) ||
- !nodesHaveSameOperandValue(Load1, Load1, AMDGPU::OpName::srsrc))
+ !nodesHaveSameOperandValue(Load0, Load1, AMDGPU::OpName::srsrc))
return false;
int OffIdx0 = AMDGPU::getNamedOperandIdx(Opc0, AMDGPU::OpName::offset);
OpenPOWER on IntegriCloud