diff options
author | Vincent Lejeune <vljn@ovi.com> | 2013-02-14 16:57:19 +0000 |
---|---|---|
committer | Vincent Lejeune <vljn@ovi.com> | 2013-02-14 16:57:19 +0000 |
commit | 786788573729899a236851320c5680da8c161ec1 (patch) | |
tree | f7212f93fa2b6f460257d495cca3532c9fe26771 /lib | |
parent | f846add9adf0752e552cb98fd0ba5dae791e4c3b (diff) | |
download | external_llvm-786788573729899a236851320c5680da8c161ec1.zip external_llvm-786788573729899a236851320c5680da8c161ec1.tar.gz external_llvm-786788573729899a236851320c5680da8c161ec1.tar.bz2 |
R600: Do not fold single instruction with more that 3 kcache read
It fixes around 100 tfb piglit tests and 16 glean tests.
NOTE: This is a candidate for the Mesa stable branch.
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/R600/AMDILISelDAGToDAG.cpp | 2 | ||||
-rw-r--r-- | lib/Target/R600/R600LowerConstCopy.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/R600/AMDILISelDAGToDAG.cpp b/lib/Target/R600/AMDILISelDAGToDAG.cpp index b125ba8..2e726e9 100644 --- a/lib/Target/R600/AMDILISelDAGToDAG.cpp +++ b/lib/Target/R600/AMDILISelDAGToDAG.cpp @@ -334,6 +334,8 @@ bool AMDGPUDAGToDAGISel::FoldOperands(unsigned Opcode, SDValue Operand = Ops[OperandIdx[i] - 1]; switch (Operand.getOpcode()) { case AMDGPUISD::CONST_ADDRESS: { + if (i == 2) + break; SDValue CstOffset; if (!Operand.getValueType().isVector() && SelectGlobalValueConstantOffset(Operand.getOperand(0), CstOffset)) { diff --git a/lib/Target/R600/R600LowerConstCopy.cpp b/lib/Target/R600/R600LowerConstCopy.cpp index 46f2aef..3ebe653 100644 --- a/lib/Target/R600/R600LowerConstCopy.cpp +++ b/lib/Target/R600/R600LowerConstCopy.cpp @@ -180,7 +180,7 @@ bool R600LowerConstCopy::runOnMachineFunction(MachineFunction &MF) { int ConstMovSel = TII->getOperandIdx(CstMov->getOpcode(), R600Operands::SRC0_SEL); unsigned ConstIndex = CstMov->getOperand(ConstMovSel).getImm(); - if (canFoldInBundle(CP, ConstIndex)) { + if (MI->isInsideBundle() && canFoldInBundle(CP, ConstIndex)) { TII->setImmOperand(MI, OpTable[SrcOp][1], ConstIndex); MI->getOperand(SrcIdx).setReg(AMDGPU::ALU_CONST); } else { |