Remove redundant type checks for constant constructors
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 11 Jun 2010 18:36:12 +0000 (11:36 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 11 Jun 2010 22:37:34 +0000 (15:37 -0700)
All of the cases (e.g., arrays and structures) that were being
filtered by these tests were already filtered by the earlier
is_numeric and is_boolean tests.

ast_function.cpp

index b0700be..aba4374 100644 (file)
@@ -548,9 +548,6 @@ ast_function_expression::hir(exec_list *instructions,
             * constant representing the complete collection of parameters.
             */
            if (all_parameters_are_constant
-               && (sig->return_type->is_scalar()
-                   || sig->return_type->is_vector()
-                   || sig->return_type->is_matrix())
                && (components_used >= type_components))
               return new ir_constant(sig->return_type, & actual_parameters);
            else