Always check the execution mask after break/continue/return.
When "break", "continue", or "return" is used under varying control flow, we now always check the execution mask to see if all of the program instances are executing it. (Previously, this was only done with "cbreak", "ccontinue", and "creturn", which are now deprecated.) An important effect of this change is that it fixes a family of cases where we could end up running with an "all off" execution mask, which isn't supposed to happen, as it leads to all sorts of invalid behavior. This change does cause the volume rendering example to run 9% slower, but doesn't affect the other examples. Issue #257.
This commit is contained in:
3
ispc.h
3
ispc.h
@@ -454,7 +454,6 @@ struct Globals {
|
||||
|
||||
enum {
|
||||
COST_ASSIGN = 1,
|
||||
COST_COHERENT_BREAK_CONTINE = 4,
|
||||
COST_COMPLEX_ARITH_OP = 4,
|
||||
COST_DELETE = 32,
|
||||
COST_DEREF = 4,
|
||||
@@ -465,7 +464,7 @@ enum {
|
||||
COST_GOTO = 4,
|
||||
COST_LOAD = 2,
|
||||
COST_NEW = 32,
|
||||
COST_REGULAR_BREAK_CONTINUE = 2,
|
||||
COST_BREAK_CONTINUE = 3,
|
||||
COST_RETURN = 4,
|
||||
COST_SELECT = 4,
|
||||
COST_SIMPLE_ARITH_LOGIC_OP = 1,
|
||||
|
||||
Reference in New Issue
Block a user