Small fixes to optimization disabling code.

This commit is contained in:
Matt Pharr
2011-12-08 14:35:57 -08:00
parent 5a2edf723b
commit 6000c696b2
2 changed files with 7 additions and 6 deletions

View File

@@ -287,7 +287,7 @@ Function::emitCode(FunctionEmitContext *ctx, llvm::Function *function,
// is all on and thence having a specialized code path for that
// case. If this is a simple function, then this isn't worth the
// code bloat / overhead.
if (checkMask) {
if (checkMask && (g->opt.disableCoherentControlFlow == false)) {
bool allTrue[ISPC_MAX_NVEC];
for (int i = 0; i < g->target.vectorWidth; ++i)
allTrue[i] = true;