diff options
author | Vincent Lejeune <vljn@ovi.com> | 2013-10-01 19:32:49 +0000 |
---|---|---|
committer | Vincent Lejeune <vljn@ovi.com> | 2013-10-01 19:32:49 +0000 |
commit | 0b342d6f743b16e2157088b1cc41b32e42e9d743 (patch) | |
tree | df25d9afb2b125a511994850ee052ab4385f0c1d /llvm/lib | |
parent | 269708b98dcaf0eb7cedd4635739c751f9caa64e (diff) | |
download | bcm5719-llvm-0b342d6f743b16e2157088b1cc41b32e42e9d743.tar.gz bcm5719-llvm-0b342d6f743b16e2157088b1cc41b32e42e9d743.zip |
R600: Put PRED_X instruction in its own clause
llvm-svn: 191789
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/R600/R600EmitClauseMarkers.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/R600EmitClauseMarkers.cpp b/llvm/lib/Target/R600/R600EmitClauseMarkers.cpp index fac2b470a80..beacc0ea62c 100644 --- a/llvm/lib/Target/R600/R600EmitClauseMarkers.cpp +++ b/llvm/lib/Target/R600/R600EmitClauseMarkers.cpp @@ -173,6 +173,14 @@ private: if (AluInstCount > TII->getMaxAlusPerClause()) break; if (I->getOpcode() == AMDGPU::PRED_X) { + // We put PRED_X in its own clause to ensure that ifcvt won't create + // clauses with more than 128 insts. + // IfCvt is indeed checking that "then" and "else" branches of an if + // statement have less than ~60 insts thus converted clauses can't be + // bigger than ~121 insts (predicate setter needs to be in the same + // clause as predicated alus). + if (AluInstCount > 0) + break; if (TII->getFlagOp(I).getImm() & MO_FLAG_PUSH) PushBeforeModifier = true; AluInstCount ++; |