nir/loop_analyze: Handle bit sizes correctly in calculate_iterations
The current code assumes everything is 32-bit which is very likely true but not guaranteed by any means. Instead, use nir_eval_const_opcode to do the calculations in a bit-size-agnostic way. We also use the new constant constructors to build the correct size constants. Fixes: 6772a17a "nir: Add a loop analysis pass" Reviewed-by:Timothy Arceri <tarceri@itsqueeze.com> (cherry picked from commit 268ad47c)
Loading
Please register or sign in to comment