nir/search: check instr type before adding to worklist
nir_algebraic_instr() ignores non-ALU instructions, so there's no point. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511>
This commit is contained in:
@@ -936,6 +936,7 @@ nir_algebraic_impl(nir_function_impl *impl,
|
|||||||
*/
|
*/
|
||||||
nir_foreach_block_reverse(block, impl) {
|
nir_foreach_block_reverse(block, impl) {
|
||||||
nir_foreach_instr_reverse(instr, block) {
|
nir_foreach_instr_reverse(instr, block) {
|
||||||
|
if (instr->type == nir_instr_type_alu)
|
||||||
nir_instr_worklist_push_tail(worklist, instr);
|
nir_instr_worklist_push_tail(worklist, instr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user