Skip to content
Commit f5e70045 authored by Faith Ekstrand's avatar Faith Ekstrand Committed by Juan A. Suarez Romero
Browse files

nir/loop_analyze: Fix phi-of-identical-alu detection



One issue was that the original version didn't check that swizzles
matched when comparing ALU instructions so it could end up matching
very different instructions.  Using the nir_instrs_equal function from
nir_instr_set.c which we use for CSE should be much more reliable.
Another was that the loop assumes it will only run two iterations which
may not be true.  If there's something which guarantees that this case
only happens for phis after ifs, it wasn't documented.

Fixes: 9e6b39e1 "nir: detect more induction variables"
Reviewed-by: default avatarTimothy Arceri <tarceri@itsqueeze.com>
(cherry picked from commit 9f7ffe41)
parent d76ab7d9
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