nir: fix if condition propagation for alu use
authorTimothy Arceri <tarceri@localhost.localdomain>
Wed, 31 Oct 2018 02:16:28 +0000 (13:16 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 31 Oct 2018 22:22:55 +0000 (09:22 +1100)
commit5b757b4097f3e1ceec29db04436970c510092126
treefb6ccbf6bdb89d069c2cb62b4e31a7eaa9729a21
parent802ae533ab3487f324a701364b06ad82e6601c69
nir: fix if condition propagation for alu use

We need to update the cursor before we check if the alu use is
dominated by the if condition. Previously we were checking if
the current location of the alu instruction was dominated by
the if condition which would miss some optimisation opportunities.

Fixes: a3b4cb34589e ("nir/opt_if: Rework condition propagation")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_opt_if.c