From e5a9e70cde3dda27dca045b12c5a818215b1a449 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 6 Apr 2010 11:42:01 -0700 Subject: [PATCH] Descend down the tree in more locations in constant folding. --- ir_constant_folding.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ir_constant_folding.cpp b/ir_constant_folding.cpp index 006eb5ffcfc..eabdc240ad3 100644 --- a/ir_constant_folding.cpp +++ b/ir_constant_folding.cpp @@ -73,6 +73,8 @@ ir_constant_folding_visitor::visit(ir_expression *ir) op[operand] = ir->operands[operand]->constant_expression_value(); if (op[operand]) { ir->operands[operand] = op[operand]; + } else { + ir->operands[operand]->accept(this); } } } @@ -81,7 +83,7 @@ ir_constant_folding_visitor::visit(ir_expression *ir) void ir_constant_folding_visitor::visit(ir_swizzle *ir) { - (void) ir; + ir->val->accept(this); } -- 2.30.2