Skip to content
Commit b4936868 authored by Caio Oliveira's avatar Caio Oliveira Committed by Dylan Baker
Browse files

nir: Take if_uses into account when repairing SSA



If a def is used as an condition before its definition, we should also
consider this a case to repair.  When repairing, make sure we rewrite
any if conditions too.

Found in while inspecting a SPIR-V conversion from a 'continue block'
that contains a conditional branch.  We pull the continue block up to
the beggining of the loop, and the condition in the branch ends up
defined afterwards.

Reviewed-by: default avatarKenneth Graunke <kenneth@whitecape.org>
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
Fixes: 364212f1 "nir: Add a pass to repair SSA form"
(cherry picked from commit c037dbb0)
parent 73bc3248
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment