Disable break optimization and change return check to use full mask.
This commit is contained in:
3
stmt.cpp
3
stmt.cpp
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user