aco: fix assertion in insert_exec_mask pass

Fixes: a56ddca4e8 ('aco: make all exec accesses non-temporaries ')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9047>
This commit is contained in:
Daniel Schürmann 2021-02-15 11:31:13 +01:00 committed by Marge Bot
parent ddce1ec5f5
commit fc6b5be666

View file

@ -579,8 +579,11 @@ unsigned add_coupling_code(exec_ctx& ctx, Block* block,
for (unsigned i = 0; i < num_exec_masks; i++) {
/* skip trivial phis */
if (ctx.info[preds[0]].exec[i].first == ctx.info[preds[1]].exec[i].first) {
assert(ctx.info[preds[0]].exec[i].second == ctx.info[preds[1]].exec[i].second);
ctx.info[idx].exec.emplace_back(ctx.info[preds[0]].exec[i]);
Temp t = ctx.info[preds[0]].exec[i].first;
/* discard/demote can change the state of the current exec mask */
assert(!t.id() || ctx.info[preds[0]].exec[i].second == ctx.info[preds[1]].exec[i].second);
uint8_t mask = ctx.info[preds[0]].exec[i].second & ctx.info[preds[1]].exec[i].second;
ctx.info[idx].exec.emplace_back(t, mask);
continue;
}