diff --git a/src/panfrost/genxml/cs_builder.h b/src/panfrost/genxml/cs_builder.h index 81ae7490e73..c460b8a383d 100644 --- a/src/panfrost/genxml/cs_builder.h +++ b/src/panfrost/genxml/cs_builder.h @@ -1085,8 +1085,8 @@ cs_loop_diverge_ls_update(struct cs_builder *b, struct cs_loop *loop) } static inline struct cs_loop * -cs_do_while_start(struct cs_builder *b, struct cs_loop *loop, - enum mali_cs_condition cond, struct cs_index val) +cs_loop_init(struct cs_builder *b, struct cs_loop *loop, + enum mali_cs_condition cond, struct cs_index val) { *loop = (struct cs_loop){ .cond = cond, @@ -1096,7 +1096,6 @@ cs_do_while_start(struct cs_builder *b, struct cs_loop *loop, cs_block_start(b, &loop->block); cs_label_init(&loop->start); cs_label_init(&loop->end); - cs_set_label(b, &loop->start); return loop; } @@ -1104,7 +1103,7 @@ static inline struct cs_loop * cs_while_start(struct cs_builder *b, struct cs_loop *loop, enum mali_cs_condition cond, struct cs_index val) { - cs_do_while_start(b, loop, cond, val); + cs_loop_init(b, loop, cond, val); /* Do an initial check on the condition, and if it's false, jump to * the end of the loop block. For 'while(true)' loops, skip the @@ -1115,6 +1114,8 @@ cs_while_start(struct cs_builder *b, struct cs_loop *loop, cs_loop_diverge_ls_update(b, loop); } + cs_set_label(b, &loop->start); + return loop; }