mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
agx: validate phi sources are defined
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
This commit is contained in:
parent
f9201eb7d3
commit
981ff77431
1 changed files with 14 additions and 0 deletions
|
|
@ -500,6 +500,20 @@ agx_validate(agx_context *ctx, const char *after)
|
|||
}
|
||||
}
|
||||
|
||||
/* agx_validate_defs skips phi sources, so validate them now */
|
||||
agx_foreach_block(ctx, block) {
|
||||
agx_foreach_phi_in_block(block, phi) {
|
||||
agx_foreach_ssa_src(phi, s) {
|
||||
if (!BITSET_TEST(defs, phi->src[s].value)) {
|
||||
fprintf(stderr, "Undefined phi source %u after %s\n",
|
||||
phi->src[s].value, after);
|
||||
agx_print_instr(phi, stderr);
|
||||
fail = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free(defs);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue