glsl: Don't tree graft in the condition of an assignment

At this point, this should always be NULL.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14573>
This commit is contained in:
Ian Romanick
2022-01-14 18:36:50 -08:00
committed by Marge Bot
parent 97ffca80a8
commit 41f6b42b08

View File

@@ -177,8 +177,7 @@ ir_tree_grafting_visitor::check_graft(ir_instruction *ir, ir_variable *var)
ir_visitor_status
ir_tree_grafting_visitor::visit_leave(ir_assignment *ir)
{
if (do_graft(&ir->rhs) ||
do_graft(&ir->condition))
if (do_graft(&ir->rhs))
return visit_stop;
/* If this assignment updates a variable used in the assignment