[llvm] r217969 - R600/SI: Remove assert
Matt Arsenault
Matthew.Arsenault at amd.com
Wed Sep 17 10:48:33 PDT 2014
Author: arsenm
Date: Wed Sep 17 12:48:32 2014
New Revision: 217969
URL: http://llvm.org/viewvc/llvm-project?rev=217969&view=rev
Log:
R600/SI: Remove assert
Since read2 / write2 are emitted for 4-byte aligned 8-byte
accesses, these are seen by the scheduler.
The DAG scheduler is semi-deprecated, so just
ignore these for now.
Modified:
llvm/trunk/lib/Target/R600/SIInstrInfo.cpp
Modified: llvm/trunk/lib/Target/R600/SIInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIInstrInfo.cpp?rev=217969&r1=217968&r2=217969&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIInstrInfo.cpp Wed Sep 17 12:48:32 2014
@@ -89,12 +89,6 @@ bool SIInstrInfo::areLoadsFromSameBasePt
if (isDS(Opc0) && isDS(Opc1)) {
assert(getNumOperandsNoGlue(Load0) == getNumOperandsNoGlue(Load1));
- // TODO: Also shouldn't see read2st
- assert(Opc0 != AMDGPU::DS_READ2_B32 &&
- Opc0 != AMDGPU::DS_READ2_B64 &&
- Opc1 != AMDGPU::DS_READ2_B32 &&
- Opc1 != AMDGPU::DS_READ2_B64);
-
// Check base reg.
if (Load0->getOperand(1) != Load1->getOperand(1))
return false;
@@ -103,6 +97,13 @@ bool SIInstrInfo::areLoadsFromSameBasePt
if (findChainOperand(Load0) != findChainOperand(Load1))
return false;
+ // Skip read2 / write2 variants for simplicity.
+ // TODO: We should report true if the used offsets are adjacent (excluded
+ // st64 versions).
+ if (AMDGPU::getNamedOperandIdx(Opc0, AMDGPU::OpName::data1) != -1 ||
+ AMDGPU::getNamedOperandIdx(Opc1, AMDGPU::OpName::data1) != -1)
+ return false;
+
Offset0 = cast<ConstantSDNode>(Load0->getOperand(2))->getZExtValue();
Offset1 = cast<ConstantSDNode>(Load1->getOperand(2))->getZExtValue();
return true;
More information about the llvm-commits
mailing list