gallivm: added some assertions in loop-gen code
We're hitting these assertions with nested loops...
This commit is contained in:
@@ -172,6 +172,7 @@ static void lp_exec_mask_update(struct lp_exec_mask *mask)
|
|||||||
/*for loops we need to update the entire mask at
|
/*for loops we need to update the entire mask at
|
||||||
* runtime */
|
* runtime */
|
||||||
LLVMValueRef tmp;
|
LLVMValueRef tmp;
|
||||||
|
assert(mask->break_mask);
|
||||||
tmp = LLVMBuildAnd(mask->bld->builder,
|
tmp = LLVMBuildAnd(mask->bld->builder,
|
||||||
mask->cont_mask,
|
mask->cont_mask,
|
||||||
mask->break_mask,
|
mask->break_mask,
|
||||||
@@ -279,8 +280,12 @@ static void lp_exec_endloop(struct lp_exec_mask *mask)
|
|||||||
LLVMBasicBlockRef endloop;
|
LLVMBasicBlockRef endloop;
|
||||||
LLVMTypeRef reg_type = LLVMIntType(mask->bld->type.width*
|
LLVMTypeRef reg_type = LLVMIntType(mask->bld->type.width*
|
||||||
mask->bld->type.length);
|
mask->bld->type.length);
|
||||||
|
LLVMValueRef i1cond;
|
||||||
|
|
||||||
|
assert(mask->break_mask);
|
||||||
|
|
||||||
/* i1cond = (mask == 0) */
|
/* i1cond = (mask == 0) */
|
||||||
LLVMValueRef i1cond = LLVMBuildICmp(
|
i1cond = LLVMBuildICmp(
|
||||||
mask->bld->builder,
|
mask->bld->builder,
|
||||||
LLVMIntNE,
|
LLVMIntNE,
|
||||||
LLVMBuildBitCast(mask->bld->builder, mask->break_mask, reg_type, ""),
|
LLVMBuildBitCast(mask->bld->builder, mask->break_mask, reg_type, ""),
|
||||||
|
Reference in New Issue
Block a user