Lines Matching refs:operands

128    ir->operands[1] = new(ir) ir_expression(ir_unop_neg, ir->operands[1]->type,  in sub_to_add_neg()
129 ir->operands[1], NULL); in sub_to_add_neg()
136 assert(ir->operands[1]->type->is_float()); in div_to_mul_rcp()
141 ir->operands[1]->type, in div_to_mul_rcp()
142 ir->operands[1]); in div_to_mul_rcp()
146 ir->operands[1] = expr; in div_to_mul_rcp()
154 assert(ir->operands[1]->type->is_integer()); in int_div_to_mul_rcp()
164 ir->operands[1]->type->vector_elements, in int_div_to_mul_rcp()
165 ir->operands[1]->type->matrix_columns); in int_div_to_mul_rcp()
167 if (ir->operands[1]->type->base_type == GLSL_TYPE_INT) in int_div_to_mul_rcp()
168 op1 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[1], NULL); in int_div_to_mul_rcp()
170 op1 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[1], NULL); in int_div_to_mul_rcp()
175 ir->operands[0]->type->vector_elements, in int_div_to_mul_rcp()
176 ir->operands[0]->type->matrix_columns); in int_div_to_mul_rcp()
178 if (ir->operands[0]->type->base_type == GLSL_TYPE_INT) in int_div_to_mul_rcp()
179 op0 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[0], NULL); in int_div_to_mul_rcp()
181 op0 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[0], NULL); in int_div_to_mul_rcp()
189 if (ir->operands[1]->type->base_type == GLSL_TYPE_INT) { in int_div_to_mul_rcp()
191 ir->operands[0] = op0; in int_div_to_mul_rcp()
194 ir->operands[0] = new(ir) ir_expression(ir_unop_f2i, op0); in int_div_to_mul_rcp()
196 ir->operands[1] = NULL; in int_div_to_mul_rcp()
207 ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[0]->type, in exp_to_exp2()
208 ir->operands[0], log2_e); in exp_to_exp2()
216 new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type, in pow_to_exp2()
217 ir->operands[0]); in pow_to_exp2()
220 ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[1]->type, in pow_to_exp2()
221 ir->operands[1], log2_x); in pow_to_exp2()
222 ir->operands[1] = NULL; in pow_to_exp2()
230 ir->operands[0] = new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type, in log_to_log2()
231 ir->operands[0], NULL); in log_to_log2()
232 ir->operands[1] = new(ir) ir_constant(float(1.0 / M_LOG2E)); in log_to_log2()
239 ir_variable *temp = new(ir) ir_variable(ir->operands[1]->type, "mod_b", in mod_to_fract()
245 ir->operands[1], NULL); in mod_to_fract()
250 new(ir) ir_expression(ir_binop_div, ir->operands[0]->type, in mod_to_fract()
251 ir->operands[0], in mod_to_fract()
261 ir->operands[0]->type, in mod_to_fract()
266 ir->operands[0] = new(ir) ir_dereference_variable(temp); in mod_to_fract()
267 ir->operands[1] = expr; in mod_to_fract()
281 if (ir->operands[1]->type->is_integer() && lowering(INT_DIV_TO_MUL_RCP)) in visit_leave()
283 else if (ir->operands[1]->type->is_float() && lowering(DIV_TO_MUL_RCP)) in visit_leave()