Disable break optimization and change return check to use full mask.

This commit is contained in:
james.brodman
2013-05-21 10:00:22 -04:00
parent 9f44e597d6
commit 4ea02c59d8
2 changed files with 4 additions and 1 deletions

View File

@@ -447,6 +447,8 @@ IfStmt::EmitCode(FunctionEmitContext *ctx) const {
ctx->SetCurrentBasicBlock(bexit);
ctx->EndIf();
}
/*
// Disabled for performance reasons. Change to an optional compile-time opt switch.
else if (lCanApplyBreakOptimization(trueStmts, falseStmts)) {
// If we have a simple break statement inside the 'if' and are
// under varying control flow, just update the execution mask
@@ -456,6 +458,7 @@ IfStmt::EmitCode(FunctionEmitContext *ctx) const {
// benefit in this case.
ctx->SetInternalMaskAndNot(ctx->GetInternalMask(), testValue);
}
*/
else
emitVaryingIf(ctx, testValue);
}