mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
nir: move ALU instruction before the jump instruction
opt_split_alu_of_phi moves ALU instruction to the end of continue block.
But if the continue block ends with a jump instruction (an explicit
"continue" instruction) then the ALU must be inserted before the jump,
as it is illegal to add instructions after the jump.
CC: Ian Romanick <ian.d.romanick@intel.com>
Fixes: 0881e90c09 ("nir: Split ALU instructions in loops that read phis")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
a43596df62
commit
69be9934a7
1 changed files with 1 additions and 1 deletions
|
|
@ -488,7 +488,7 @@ opt_split_alu_of_phi(nir_builder *b, nir_loop *loop)
|
|||
*
|
||||
* Insert the new instruction at the end of the continue block.
|
||||
*/
|
||||
b->cursor = nir_after_block(continue_block);
|
||||
b->cursor = nir_after_block_before_jump(continue_block);
|
||||
|
||||
nir_ssa_def *const alu_copy =
|
||||
clone_alu_and_replace_src_defs(b, alu, continue_srcs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue