• Home
  • Raw
  • Download

Lines Matching full:ir

124 #include "ir.h"
169 void reverse_to_shifts(ir_expression *ir);
170 void find_lsb_to_float_cast(ir_expression *ir);
171 void find_msb_to_float_cast(ir_expression *ir);
172 void imul_high_to_mul(ir_expression *ir);
173 void sqrt_to_abs_sqrt(ir_expression *ir);
174 void mul64_to_mul_and_mul_high(ir_expression *ir);
201 lower_instructions_visitor::sub_to_add_neg(ir_expression *ir) in sub_to_add_neg() argument
203 ir->operation = ir_binop_add; in sub_to_add_neg()
204 ir->init_num_operands(); in sub_to_add_neg()
205 ir->operands[1] = new(ir) ir_expression(ir_unop_neg, ir->operands[1]->type, in sub_to_add_neg()
206 ir->operands[1], NULL); in sub_to_add_neg()
211 lower_instructions_visitor::div_to_mul_rcp(ir_expression *ir) in div_to_mul_rcp() argument
213 assert(ir->operands[1]->type->is_float_16_32_64()); in div_to_mul_rcp()
217 expr = new(ir) ir_expression(ir_unop_rcp, in div_to_mul_rcp()
218 ir->operands[1]->type, in div_to_mul_rcp()
219 ir->operands[1]); in div_to_mul_rcp()
222 ir->operation = ir_binop_mul; in div_to_mul_rcp()
223 ir->init_num_operands(); in div_to_mul_rcp()
224 ir->operands[1] = expr; in div_to_mul_rcp()
230 lower_instructions_visitor::int_div_to_mul_rcp(ir_expression *ir) in int_div_to_mul_rcp() argument
232 assert(ir->operands[1]->type->is_integer_32()); in int_div_to_mul_rcp()
242 ir->operands[1]->type->vector_elements, in int_div_to_mul_rcp()
243 ir->operands[1]->type->matrix_columns); in int_div_to_mul_rcp()
245 if (ir->operands[1]->type->base_type == GLSL_TYPE_INT) in int_div_to_mul_rcp()
246 op1 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[1], NULL); in int_div_to_mul_rcp()
248 op1 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[1], NULL); in int_div_to_mul_rcp()
250 op1 = new(ir) ir_expression(ir_unop_rcp, op1->type, op1, NULL); in int_div_to_mul_rcp()
253 ir->operands[0]->type->vector_elements, in int_div_to_mul_rcp()
254 ir->operands[0]->type->matrix_columns); in int_div_to_mul_rcp()
256 if (ir->operands[0]->type->base_type == GLSL_TYPE_INT) in int_div_to_mul_rcp()
257 op0 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[0], NULL); in int_div_to_mul_rcp()
259 op0 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[0], NULL); in int_div_to_mul_rcp()
262 ir->type->vector_elements, in int_div_to_mul_rcp()
263 ir->type->matrix_columns); in int_div_to_mul_rcp()
265 op0 = new(ir) ir_expression(ir_binop_mul, vec_type, op0, op1); in int_div_to_mul_rcp()
267 if (ir->operands[1]->type->base_type == GLSL_TYPE_INT) { in int_div_to_mul_rcp()
268 ir->operation = ir_unop_f2i; in int_div_to_mul_rcp()
269 ir->operands[0] = op0; in int_div_to_mul_rcp()
271 ir->operation = ir_unop_i2u; in int_div_to_mul_rcp()
272 ir->operands[0] = new(ir) ir_expression(ir_unop_f2i, op0); in int_div_to_mul_rcp()
274 ir->init_num_operands(); in int_div_to_mul_rcp()
275 ir->operands[1] = NULL; in int_div_to_mul_rcp()
281 lower_instructions_visitor::exp_to_exp2(ir_expression *ir) in exp_to_exp2() argument
283 ir_constant *log2_e = _imm_fp(ir, ir->type, M_LOG2E); in exp_to_exp2()
285 ir->operation = ir_unop_exp2; in exp_to_exp2()
286 ir->init_num_operands(); in exp_to_exp2()
287 ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[0]->type, in exp_to_exp2()
288 ir->operands[0], log2_e); in exp_to_exp2()
293 lower_instructions_visitor::pow_to_exp2(ir_expression *ir) in pow_to_exp2() argument
296 new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type, in pow_to_exp2()
297 ir->operands[0]); in pow_to_exp2()
299 ir->operation = ir_unop_exp2; in pow_to_exp2()
300 ir->init_num_operands(); in pow_to_exp2()
301 ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[1]->type, in pow_to_exp2()
302 ir->operands[1], log2_x); in pow_to_exp2()
303 ir->operands[1] = NULL; in pow_to_exp2()
308 lower_instructions_visitor::log_to_log2(ir_expression *ir) in log_to_log2() argument
310 ir->operation = ir_binop_mul; in log_to_log2()
311 ir->init_num_operands(); in log_to_log2()
312 ir->operands[0] = new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type, in log_to_log2()
313 ir->operands[0], NULL); in log_to_log2()
314 ir->operands[1] = _imm_fp(ir, ir->operands[0]->type, 1.0 / M_LOG2E); in log_to_log2()
319 lower_instructions_visitor::mod_to_floor(ir_expression *ir) in mod_to_floor() argument
321 ir_variable *x = new(ir) ir_variable(ir->operands[0]->type, "mod_x", in mod_to_floor()
323 ir_variable *y = new(ir) ir_variable(ir->operands[1]->type, "mod_y", in mod_to_floor()
329 new(ir) ir_assignment(new(ir) ir_dereference_variable(x), in mod_to_floor()
330 ir->operands[0]); in mod_to_floor()
332 new(ir) ir_assignment(new(ir) ir_dereference_variable(y), in mod_to_floor()
333 ir->operands[1]); in mod_to_floor()
339 new(ir) ir_expression(ir_binop_div, x->type, in mod_to_floor()
340 new(ir) ir_dereference_variable(x), in mod_to_floor()
341 new(ir) ir_dereference_variable(y)); in mod_to_floor()
343 /* Don't generate new IR that would need to be lowered in an additional in mod_to_floor()
346 if ((lowering(FDIV_TO_MUL_RCP) && ir->type->is_float_16_32()) || in mod_to_floor()
347 (lowering(DDIV_TO_MUL_RCP) && ir->type->is_double())) in mod_to_floor()
351 new(ir) ir_expression(ir_unop_floor, x->type, div_expr); in mod_to_floor()
353 if (lowering(DOPS_TO_DFRAC) && ir->type->is_double()) in mod_to_floor()
357 new(ir) ir_expression(ir_binop_mul, in mod_to_floor()
358 new(ir) ir_dereference_variable(y), in mod_to_floor()
361 ir->operation = ir_binop_sub; in mod_to_floor()
362 ir->init_num_operands(); in mod_to_floor()
363 ir->operands[0] = new(ir) ir_dereference_variable(x); in mod_to_floor()
364 ir->operands[1] = mul_expr; in mod_to_floor()
369 lower_instructions_visitor::ldexp_to_arith(ir_expression *ir) in ldexp_to_arith() argument
393 * which we can't actually implement as such, since the GLSL IR doesn't in ldexp_to_arith()
426 const unsigned vec_elem = ir->type->vector_elements; in ldexp_to_arith()
434 ir_variable *x = new(ir) ir_variable(ir->type, "x", ir_var_temporary); in ldexp_to_arith()
435 ir_variable *exp = new(ir) ir_variable(ivec, "exp", ir_var_temporary); in ldexp_to_arith()
436 ir_variable *result = new(ir) ir_variable(uvec, "result", ir_var_temporary); in ldexp_to_arith()
439 new(ir) ir_variable(ivec, "extracted_biased_exp", ir_var_temporary); in ldexp_to_arith()
441 new(ir) ir_variable(ivec, "resulting_biased_exp", ir_var_temporary); in ldexp_to_arith()
444 new(ir) ir_variable(uvec, "sign_mantissa", ir_var_temporary); in ldexp_to_arith()
447 new(ir) ir_variable(bvec, "flush_to_zero", ir_var_temporary); in ldexp_to_arith()
449 new(ir) ir_variable(bvec, "zero_mantissa", ir_var_temporary); in ldexp_to_arith()
455 i.insert_before(assign(x, ir->operands[0])); in ldexp_to_arith()
457 i.insert_before(assign(exp, ir->operands[1])); in ldexp_to_arith()
463 new(ir) ir_constant(23, vec_elem)))); in ldexp_to_arith()
479 new(ir) ir_constant(255, vec_elem)))); in ldexp_to_arith()
484 new(ir) ir_constant(0x807fffffu, vec_elem)))); in ldexp_to_arith()
498 ir_constant::zero(ir, ivec)))); in ldexp_to_arith()
501 ir_constant::zero(ir, ivec), in ldexp_to_arith()
508 new(ir) ir_constant(255, vec_elem))))); in ldexp_to_arith()
512 new(ir) ir_constant(0x80000000u, vec_elem)), in ldexp_to_arith()
515 /* Don't generate new IR that would need to be lowered in an additional in ldexp_to_arith()
523 new(ir) ir_constant(23u, vec_elem), in ldexp_to_arith()
524 new(ir) ir_constant(8u, vec_elem)))); in ldexp_to_arith()
529 new(ir) ir_constant(23, vec_elem))))); in ldexp_to_arith()
532 ir->operation = ir_triop_csel; in ldexp_to_arith()
533 ir->init_num_operands(); in ldexp_to_arith()
534 ir->operands[0] = gequal(extracted_biased_exp, in ldexp_to_arith()
535 new(ir) ir_constant(255, vec_elem)); in ldexp_to_arith()
536 ir->operands[1] = new(ir) ir_dereference_variable(x); in ldexp_to_arith()
537 ir->operands[2] = bitcast_u2f(result); in ldexp_to_arith()
543 lower_instructions_visitor::dldexp_to_arith(ir_expression *ir) in dldexp_to_arith() argument
549 const unsigned vec_elem = ir->type->vector_elements; in dldexp_to_arith()
556 ir_constant *zeroi = ir_constant::zero(ir, ivec); in dldexp_to_arith()
558 ir_constant *sign_mask = new(ir) ir_constant(0x80000000u); in dldexp_to_arith()
560 ir_constant *exp_shift = new(ir) ir_constant(20u); in dldexp_to_arith()
561 ir_constant *exp_width = new(ir) ir_constant(11u); in dldexp_to_arith()
562 ir_constant *exp_bias = new(ir) ir_constant(1022, vec_elem); in dldexp_to_arith()
565 ir_variable *x = new(ir) ir_variable(ir->type, "x", ir_var_temporary); in dldexp_to_arith()
566 ir_variable *exp = new(ir) ir_variable(ivec, "exp", ir_var_temporary); in dldexp_to_arith()
568 ir_variable *zero_sign_x = new(ir) ir_variable(ir->type, "zero_sign_x", in dldexp_to_arith()
572 new(ir) ir_variable(ivec, "extracted_biased_exp", ir_var_temporary); in dldexp_to_arith()
574 new(ir) ir_variable(ivec, "resulting_biased_exp", ir_var_temporary); in dldexp_to_arith()
577 new(ir) ir_variable(bvec, "is_not_zero_or_underflow", ir_var_temporary); in dldexp_to_arith()
583 i.insert_before(assign(x, ir->operands[0])); in dldexp_to_arith()
585 i.insert_before(assign(exp, ir->operands[1])); in dldexp_to_arith()
608 new(ir) ir_variable(glsl_type::uvec2_type, "unpacked", ir_var_temporary); in dldexp_to_arith()
613 i.insert_before(assign(unpacked, bit_and(swizzle_y(unpacked), sign_mask->clone(ir, NULL)), in dldexp_to_arith()
615 i.insert_before(assign(unpacked, ir_constant::zero(ir, glsl_type::uint_type), WRITEMASK_X)); in dldexp_to_arith()
623 new(ir) ir_constant(0x1, vec_elem)))); in dldexp_to_arith()
641 new(ir) ir_variable(glsl_type::uvec2_type, "unpacked", ir_var_temporary); in dldexp_to_arith()
650 exp_shift->clone(ir, NULL), in dldexp_to_arith()
651 exp_width->clone(ir, NULL)); in dldexp_to_arith()
658 ir->operation = ir_quadop_vector; in dldexp_to_arith()
659 ir->init_num_operands(); in dldexp_to_arith()
660 ir->operands[0] = results[0]; in dldexp_to_arith()
661 ir->operands[1] = results[1]; in dldexp_to_arith()
662 ir->operands[2] = results[2]; in dldexp_to_arith()
663 ir->operands[3] = results[3]; in dldexp_to_arith()
665 /* Don't generate new IR that would need to be lowered in an additional in dldexp_to_arith()
673 lower_instructions_visitor::dfrexp_sig_to_arith(ir_expression *ir) in dfrexp_sig_to_arith() argument
675 const unsigned vec_elem = ir->type->vector_elements; in dfrexp_sig_to_arith()
691 new(ir) ir_variable(bvec, "is_not_zero", ir_var_temporary); in dfrexp_sig_to_arith()
694 ir_constant *dzero = new(ir) ir_constant(0.0, vec_elem); in dfrexp_sig_to_arith()
698 nequal(abs(ir->operands[0]->clone(ir, NULL)), dzero))); in dfrexp_sig_to_arith()
704 ir_constant *zero = new(ir) ir_constant(0u, 1); in dfrexp_sig_to_arith()
705 ir_constant *sign_mantissa_mask = new(ir) ir_constant(0x800fffffu, 1); in dfrexp_sig_to_arith()
708 ir_constant *exponent_value = new(ir) ir_constant(0x3fe00000u, 1); in dfrexp_sig_to_arith()
711 new(ir) ir_variable(glsl_type::uint_type, "bits", ir_var_temporary); in dfrexp_sig_to_arith()
713 new(ir) ir_variable(glsl_type::uvec2_type, "unpacked", ir_var_temporary); in dfrexp_sig_to_arith()
715 ir_rvalue *x = swizzle(ir->operands[0]->clone(ir, NULL), elem, 1); in dfrexp_sig_to_arith()
735 ir->operation = ir_quadop_vector; in dfrexp_sig_to_arith()
736 ir->init_num_operands(); in dfrexp_sig_to_arith()
737 ir->operands[0] = results[0]; in dfrexp_sig_to_arith()
738 ir->operands[1] = results[1]; in dfrexp_sig_to_arith()
739 ir->operands[2] = results[2]; in dfrexp_sig_to_arith()
740 ir->operands[3] = results[3]; in dfrexp_sig_to_arith()
746 lower_instructions_visitor::dfrexp_exp_to_arith(ir_expression *ir) in dfrexp_exp_to_arith() argument
748 const unsigned vec_elem = ir->type->vector_elements; in dfrexp_exp_to_arith()
764 new(ir) ir_variable(bvec, "is_not_zero", ir_var_temporary); in dfrexp_exp_to_arith()
766 new(ir) ir_variable(uvec, "high_words", ir_var_temporary); in dfrexp_exp_to_arith()
767 ir_constant *dzero = new(ir) ir_constant(0.0, vec_elem); in dfrexp_exp_to_arith()
768 ir_constant *izero = new(ir) ir_constant(0, vec_elem); in dfrexp_exp_to_arith()
770 ir_rvalue *absval = abs(ir->operands[0]); in dfrexp_exp_to_arith()
774 i.insert_before(assign(is_not_zero, nequal(absval->clone(ir, NULL), dzero))); in dfrexp_exp_to_arith()
778 ir_rvalue *x = swizzle(absval->clone(ir, NULL), elem, 1); in dfrexp_exp_to_arith()
785 ir_constant *exponent_shift = new(ir) ir_constant(20, vec_elem); in dfrexp_exp_to_arith()
786 ir_constant *exponent_bias = new(ir) ir_constant(-1022, vec_elem); in dfrexp_exp_to_arith()
789 ir->operation = ir_triop_csel; in dfrexp_exp_to_arith()
790 ir->init_num_operands(); in dfrexp_exp_to_arith()
791 ir->operands[0] = new(ir) ir_dereference_variable(is_not_zero); in dfrexp_exp_to_arith()
792 ir->operands[1] = add(exponent_bias, u2i(rshift(high_words, exponent_shift))); in dfrexp_exp_to_arith()
793 ir->operands[2] = izero; in dfrexp_exp_to_arith()
799 lower_instructions_visitor::carry_to_arith(ir_expression *ir) in carry_to_arith() argument
809 ir_rvalue *x_clone = ir->operands[0]->clone(ir, NULL); in carry_to_arith()
810 ir->operation = ir_unop_i2u; in carry_to_arith()
811 ir->init_num_operands(); in carry_to_arith()
812 ir->operands[0] = b2i(less(add(ir->operands[0], ir->operands[1]), x_clone)); in carry_to_arith()
813 ir->operands[1] = NULL; in carry_to_arith()
819 lower_instructions_visitor::borrow_to_arith(ir_expression *ir) in borrow_to_arith() argument
828 ir->operation = ir_unop_i2u; in borrow_to_arith()
829 ir->init_num_operands(); in borrow_to_arith()
830 ir->operands[0] = b2i(less(ir->operands[0], ir->operands[1])); in borrow_to_arith()
831 ir->operands[1] = NULL; in borrow_to_arith()
837 lower_instructions_visitor::sat_to_clamp(ir_expression *ir) in sat_to_clamp() argument
845 ir->operation = ir_binop_min; in sat_to_clamp()
846 ir->init_num_operands(); in sat_to_clamp()
848 ir_constant *zero = _imm_fp(ir, ir->operands[0]->type, 0.0); in sat_to_clamp()
849 ir->operands[0] = new(ir) ir_expression(ir_binop_max, ir->operands[0]->type, in sat_to_clamp()
850 ir->operands[0], zero); in sat_to_clamp()
851 ir->operands[1] = _imm_fp(ir, ir->operands[0]->type, 1.0); in sat_to_clamp()
857 lower_instructions_visitor::double_dot_to_fma(ir_expression *ir) in double_dot_to_fma() argument
859 ir_variable *temp = new(ir) ir_variable(ir->operands[0]->type->get_base_type(), "dot_res", in double_dot_to_fma()
863 int nc = ir->operands[0]->type->components(); in double_dot_to_fma()
867 assig = assign(temp, mul(swizzle(ir->operands[0]->clone(ir, NULL), i, 1), in double_dot_to_fma()
868 swizzle(ir->operands[1]->clone(ir, NULL), i, 1))); in double_dot_to_fma()
870 assig = assign(temp, fma(swizzle(ir->operands[0]->clone(ir, NULL), i, 1), in double_dot_to_fma()
871 swizzle(ir->operands[1]->clone(ir, NULL), i, 1), in double_dot_to_fma()
877 ir->operation = ir_triop_fma; in double_dot_to_fma()
878 ir->init_num_operands(); in double_dot_to_fma()
879 ir->operands[0] = swizzle(ir->operands[0], 0, 1); in double_dot_to_fma()
880 ir->operands[1] = swizzle(ir->operands[1], 0, 1); in double_dot_to_fma()
881 ir->operands[2] = new(ir) ir_dereference_variable(temp); in double_dot_to_fma()
888 lower_instructions_visitor::double_lrp(ir_expression *ir) in double_lrp() argument
891 ir_rvalue *op0 = ir->operands[0], *op2 = ir->operands[2]; in double_lrp()
892 ir_constant *one = new(ir) ir_constant(1.0, op2->type->vector_elements); in double_lrp()
904 ir->operation = ir_triop_fma; in double_lrp()
905 ir->init_num_operands(); in double_lrp()
906 ir->operands[0] = swizzle(op2, swizval, op0->type->vector_elements); in double_lrp()
907 ir->operands[2] = mul(sub(one, op2->clone(ir, NULL)), op0); in double_lrp()
913 lower_instructions_visitor::dceil_to_dfrac(ir_expression *ir) in dceil_to_dfrac() argument
921 ir_constant *zero = new(ir) ir_constant(0.0, ir->operands[0]->type->vector_elements); in dceil_to_dfrac()
922 ir_constant *one = new(ir) ir_constant(1.0, ir->operands[0]->type->vector_elements); in dceil_to_dfrac()
923 ir_variable *frtemp = new(ir) ir_variable(ir->operands[0]->type, "frtemp", in dceil_to_dfrac()
927 i.insert_before(assign(frtemp, fract(ir->operands[0]))); in dceil_to_dfrac()
929 ir->operation = ir_binop_add; in dceil_to_dfrac()
930 ir->init_num_operands(); in dceil_to_dfrac()
931 ir->operands[0] = sub(ir->operands[0]->clone(ir, NULL), frtemp); in dceil_to_dfrac()
932 ir->operands[1] = csel(nequal(frtemp, zero), one, zero->clone(ir, NULL)); in dceil_to_dfrac()
938 lower_instructions_visitor::dfloor_to_dfrac(ir_expression *ir) in dfloor_to_dfrac() argument
944 ir->operation = ir_binop_sub; in dfloor_to_dfrac()
945 ir->init_num_operands(); in dfloor_to_dfrac()
946 ir->operands[1] = fract(ir->operands[0]->clone(ir, NULL)); in dfloor_to_dfrac()
951 lower_instructions_visitor::dround_even_to_dfrac(ir_expression *ir) in dround_even_to_dfrac() argument
965 ir_variable *frtemp = new(ir) ir_variable(ir->operands[0]->type, "frtemp", in dround_even_to_dfrac()
967 ir_variable *temp = new(ir) ir_variable(ir->operands[0]->type, "temp", in dround_even_to_dfrac()
969 ir_variable *t2 = new(ir) ir_variable(ir->operands[0]->type, "t2", in dround_even_to_dfrac()
971 ir_constant *p5 = new(ir) ir_constant(0.5, ir->operands[0]->type->vector_elements); in dround_even_to_dfrac()
972 ir_constant *one = new(ir) ir_constant(1.0, ir->operands[0]->type->vector_elements); in dround_even_to_dfrac()
973 ir_constant *zero = new(ir) ir_constant(0.0, ir->operands[0]->type->vector_elements); in dround_even_to_dfrac()
976 i.insert_before(assign(temp, add(ir->operands[0], p5))); in dround_even_to_dfrac()
984 ir->operation = ir_triop_csel; in dround_even_to_dfrac()
985 ir->init_num_operands(); in dround_even_to_dfrac()
986 ir->operands[0] = equal(fract(ir->operands[0]->clone(ir, NULL)), in dround_even_to_dfrac()
987 p5->clone(ir, NULL)); in dround_even_to_dfrac()
988 ir->operands[1] = csel(equal(fract(mul(t2, p5->clone(ir, NULL))), in dround_even_to_dfrac()
992 ir->operands[2] = new(ir) ir_dereference_variable(t2); in dround_even_to_dfrac()
998 lower_instructions_visitor::dtrunc_to_dfrac(ir_expression *ir) in dtrunc_to_dfrac() argument
1005 ir_rvalue *arg = ir->operands[0]; in dtrunc_to_dfrac()
1008 ir_constant *zero = new(ir) ir_constant(0.0, arg->type->vector_elements); in dtrunc_to_dfrac()
1009 ir_constant *one = new(ir) ir_constant(1.0, arg->type->vector_elements); in dtrunc_to_dfrac()
1010 ir_variable *frtemp = new(ir) ir_variable(arg->type, "frtemp", in dtrunc_to_dfrac()
1012 ir_variable *temp = new(ir) ir_variable(ir->operands[0]->type, "temp", in dtrunc_to_dfrac()
1018 i.insert_before(assign(temp, sub(arg->clone(ir, NULL), frtemp))); in dtrunc_to_dfrac()
1020 ir->operation = ir_triop_csel; in dtrunc_to_dfrac()
1021 ir->init_num_operands(); in dtrunc_to_dfrac()
1022 ir->operands[0] = gequal(arg->clone(ir, NULL), zero); in dtrunc_to_dfrac()
1023 ir->operands[1] = new (ir) ir_dereference_variable(temp); in dtrunc_to_dfrac()
1024 ir->operands[2] = add(temp, in dtrunc_to_dfrac()
1025 csel(equal(frtemp, zero->clone(ir, NULL)), in dtrunc_to_dfrac()
1026 zero->clone(ir, NULL), in dtrunc_to_dfrac()
1033 lower_instructions_visitor::dsign_to_csel(ir_expression *ir) in dsign_to_csel() argument
1039 ir_rvalue *arg = ir->operands[0]; in dsign_to_csel()
1040 ir_constant *zero = new(ir) ir_constant(0.0, arg->type->vector_elements); in dsign_to_csel()
1041 ir_constant *one = new(ir) ir_constant(1.0, arg->type->vector_elements); in dsign_to_csel()
1042 ir_constant *neg_one = new(ir) ir_constant(-1.0, arg->type->vector_elements); in dsign_to_csel()
1044 ir->operation = ir_triop_csel; in dsign_to_csel()
1045 ir->init_num_operands(); in dsign_to_csel()
1046 ir->operands[0] = less(arg->clone(ir, NULL), in dsign_to_csel()
1047 zero->clone(ir, NULL)); in dsign_to_csel()
1048 ir->operands[1] = neg_one; in dsign_to_csel()
1049 ir->operands[2] = csel(greater(arg, zero), in dsign_to_csel()
1051 zero->clone(ir, NULL)); in dsign_to_csel()
1057 lower_instructions_visitor::bit_count_to_math(ir_expression *ir) in bit_count_to_math() argument
1063 const unsigned elements = ir->operands[0]->type->vector_elements; in bit_count_to_math()
1064 ir_variable *temp = new(ir) ir_variable(glsl_type::uvec(elements), "temp", in bit_count_to_math()
1066 ir_constant *c55555555 = new(ir) ir_constant(0x55555555u); in bit_count_to_math()
1067 ir_constant *c33333333 = new(ir) ir_constant(0x33333333u); in bit_count_to_math()
1068 ir_constant *c0F0F0F0F = new(ir) ir_constant(0x0F0F0F0Fu); in bit_count_to_math()
1069 ir_constant *c01010101 = new(ir) ir_constant(0x01010101u); in bit_count_to_math()
1070 ir_constant *c1 = new(ir) ir_constant(1u); in bit_count_to_math()
1071 ir_constant *c2 = new(ir) ir_constant(2u); in bit_count_to_math()
1072 ir_constant *c4 = new(ir) ir_constant(4u); in bit_count_to_math()
1073 ir_constant *c24 = new(ir) ir_constant(24u); in bit_count_to_math()
1077 if (ir->operands[0]->type->base_type == GLSL_TYPE_UINT) { in bit_count_to_math()
1078 base_ir->insert_before(assign(temp, ir->operands[0])); in bit_count_to_math()
1080 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in bit_count_to_math()
1081 base_ir->insert_before(assign(temp, i2u(ir->operands[0]))); in bit_count_to_math()
1091 c33333333->clone(ir, NULL))))); in bit_count_to_math()
1094 ir->operation = ir_unop_u2i; in bit_count_to_math()
1095 ir->init_num_operands(); in bit_count_to_math()
1096 ir->operands[0] = rshift(mul(bit_and(add(temp, rshift(temp, c4)), c0F0F0F0F), in bit_count_to_math()
1104 lower_instructions_visitor::extract_to_shifts(ir_expression *ir) in extract_to_shifts() argument
1107 new(ir) ir_variable(ir->operands[0]->type, "bits", ir_var_temporary); in extract_to_shifts()
1110 base_ir->insert_before(assign(bits, ir->operands[2])); in extract_to_shifts()
1112 if (ir->operands[0]->type->base_type == GLSL_TYPE_UINT) { in extract_to_shifts()
1114 new(ir) ir_constant(1u, ir->operands[0]->type->vector_elements); in extract_to_shifts()
1116 new(ir) ir_constant(32u, ir->operands[0]->type->vector_elements); in extract_to_shifts()
1118 new(ir) ir_constant(0xFFFFFFFFu, ir->operands[0]->type->vector_elements); in extract_to_shifts()
1127 sub(lshift(c1, bits), c1->clone(ir, NULL))); in extract_to_shifts()
1138 ir->operation = ir_binop_bit_and; in extract_to_shifts()
1139 ir->init_num_operands(); in extract_to_shifts()
1140 ir->operands[0] = rshift(ir->operands[0], ir->operands[1]); in extract_to_shifts()
1141 ir->operands[1] = mask; in extract_to_shifts()
1142 ir->operands[2] = NULL; in extract_to_shifts()
1145 new(ir) ir_constant(int(0), ir->operands[0]->type->vector_elements); in extract_to_shifts()
1147 new(ir) ir_constant(int(32), ir->operands[0]->type->vector_elements); in extract_to_shifts()
1149 new(ir) ir_variable(ir->operands[0]->type, "temp", ir_var_temporary); in extract_to_shifts()
1157 rshift(lshift(ir->operands[0], sub(temp, ir->operands[1])), temp); in extract_to_shifts()
1169 ir->operation = ir_triop_csel; in extract_to_shifts()
1170 ir->init_num_operands(); in extract_to_shifts()
1171 ir->operands[0] = equal(c0, bits); in extract_to_shifts()
1172 ir->operands[1] = c0->clone(ir, NULL); in extract_to_shifts()
1173 ir->operands[2] = expr; in extract_to_shifts()
1180 lower_instructions_visitor::insert_to_shifts(ir_expression *ir) in insert_to_shifts() argument
1186 new(ir) ir_variable(ir->operands[0]->type, "offset", ir_var_temporary); in insert_to_shifts()
1188 new(ir) ir_variable(ir->operands[0]->type, "bits", ir_var_temporary); in insert_to_shifts()
1190 new(ir) ir_variable(ir->operands[0]->type, "mask", ir_var_temporary); in insert_to_shifts()
1192 if (ir->operands[0]->type->base_type == GLSL_TYPE_INT) { in insert_to_shifts()
1193 c1 = new(ir) ir_constant(int(1), ir->operands[0]->type->vector_elements); in insert_to_shifts()
1194 c32 = new(ir) ir_constant(int(32), ir->operands[0]->type->vector_elements); in insert_to_shifts()
1195 cFFFFFFFF = new(ir) ir_constant(int(0xFFFFFFFF), ir->operands[0]->type->vector_elements); in insert_to_shifts()
1197 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in insert_to_shifts()
1199 c1 = new(ir) ir_constant(1u, ir->operands[0]->type->vector_elements); in insert_to_shifts()
1200 c32 = new(ir) ir_constant(32u, ir->operands[0]->type->vector_elements); in insert_to_shifts()
1201 cFFFFFFFF = new(ir) ir_constant(0xFFFFFFFFu, ir->operands[0]->type->vector_elements); in insert_to_shifts()
1205 base_ir->insert_before(assign(offset, ir->operands[2])); in insert_to_shifts()
1208 base_ir->insert_before(assign(bits, ir->operands[3])); in insert_to_shifts()
1232 c1->clone(ir, NULL)), in insert_to_shifts()
1236 ir->operation = ir_binop_bit_or; in insert_to_shifts()
1237 ir->init_num_operands(); in insert_to_shifts()
1238 ir->operands[0] = bit_and(ir->operands[0], bit_not(mask)); in insert_to_shifts()
1239 ir->operands[1] = bit_and(lshift(ir->operands[1], offset), mask); in insert_to_shifts()
1240 ir->operands[2] = NULL; in insert_to_shifts()
1241 ir->operands[3] = NULL; in insert_to_shifts()
1247 lower_instructions_visitor::reverse_to_shifts(ir_expression *ir) in reverse_to_shifts() argument
1254 new(ir) ir_constant(1u, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1256 new(ir) ir_constant(2u, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1258 new(ir) ir_constant(4u, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1260 new(ir) ir_constant(8u, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1262 new(ir) ir_constant(16u, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1264 new(ir) ir_constant(0x33333333u, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1266 new(ir) ir_constant(0x55555555u, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1268 new(ir) ir_constant(0x0F0F0F0Fu, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1270 new(ir) ir_constant(0x00FF00FFu, ir->operands[0]->type->vector_elements); in reverse_to_shifts()
1272 new(ir) ir_variable(glsl_type::uvec(ir->operands[0]->type->vector_elements), in reverse_to_shifts()
1278 if (ir->operands[0]->type->base_type == GLSL_TYPE_UINT) { in reverse_to_shifts()
1279 i.insert_before(assign(temp, ir->operands[0])); in reverse_to_shifts()
1281 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in reverse_to_shifts()
1282 i.insert_before(assign(temp, i2u(ir->operands[0]))); in reverse_to_shifts()
1290 lshift(bit_and(temp, c55555555->clone(ir, NULL)), in reverse_to_shifts()
1291 c1->clone(ir, NULL))))); in reverse_to_shifts()
1297 lshift(bit_and(temp, c33333333->clone(ir, NULL)), in reverse_to_shifts()
1298 c2->clone(ir, NULL))))); in reverse_to_shifts()
1305 lshift(bit_and(temp, c0F0F0F0F->clone(ir, NULL)), in reverse_to_shifts()
1306 c4->clone(ir, NULL))))); in reverse_to_shifts()
1316 lshift(bit_and(temp, c00FF00FF->clone(ir, NULL)), in reverse_to_shifts()
1317 c8->clone(ir, NULL))))); in reverse_to_shifts()
1319 if (ir->operands[0]->type->base_type == GLSL_TYPE_UINT) { in reverse_to_shifts()
1320 ir->operation = ir_binop_bit_or; in reverse_to_shifts()
1321 ir->init_num_operands(); in reverse_to_shifts()
1322 ir->operands[0] = rshift(temp, c16); in reverse_to_shifts()
1323 ir->operands[1] = lshift(temp, c16->clone(ir, NULL)); in reverse_to_shifts()
1325 ir->operation = ir_unop_u2i; in reverse_to_shifts()
1326 ir->init_num_operands(); in reverse_to_shifts()
1327 ir->operands[0] = bit_or(rshift(temp, c16), in reverse_to_shifts()
1328 lshift(temp, c16->clone(ir, NULL))); in reverse_to_shifts()
1335 lower_instructions_visitor::find_lsb_to_float_cast(ir_expression *ir) in find_lsb_to_float_cast() argument
1341 const unsigned elements = ir->operands[0]->type->vector_elements; in find_lsb_to_float_cast()
1342 ir_constant *c0 = new(ir) ir_constant(unsigned(0), elements); in find_lsb_to_float_cast()
1343 ir_constant *cminus1 = new(ir) ir_constant(int(-1), elements); in find_lsb_to_float_cast()
1344 ir_constant *c23 = new(ir) ir_constant(int(23), elements); in find_lsb_to_float_cast()
1345 ir_constant *c7F = new(ir) ir_constant(int(0x7F), elements); in find_lsb_to_float_cast()
1347 new(ir) ir_variable(glsl_type::ivec(elements), "temp", ir_var_temporary); in find_lsb_to_float_cast()
1349 new(ir) ir_variable(glsl_type::uvec(elements), "lsb_only", ir_var_temporary); in find_lsb_to_float_cast()
1351 new(ir) ir_variable(glsl_type::vec(elements), "as_float", ir_var_temporary); in find_lsb_to_float_cast()
1353 new(ir) ir_variable(glsl_type::ivec(elements), "lsb", ir_var_temporary); in find_lsb_to_float_cast()
1359 if (ir->operands[0]->type->base_type == GLSL_TYPE_INT) { in find_lsb_to_float_cast()
1360 i.insert_before(assign(temp, ir->operands[0])); in find_lsb_to_float_cast()
1362 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in find_lsb_to_float_cast()
1363 i.insert_before(assign(temp, u2i(ir->operands[0]))); in find_lsb_to_float_cast()
1406 ir->operation = ir_triop_csel; in find_lsb_to_float_cast()
1407 ir->init_num_operands(); in find_lsb_to_float_cast()
1408 ir->operands[0] = equal(lsb_only, c0); in find_lsb_to_float_cast()
1409 ir->operands[1] = cminus1; in find_lsb_to_float_cast()
1410 ir->operands[2] = new(ir) ir_dereference_variable(lsb); in find_lsb_to_float_cast()
1416 lower_instructions_visitor::find_msb_to_float_cast(ir_expression *ir) in find_msb_to_float_cast() argument
1422 const unsigned elements = ir->operands[0]->type->vector_elements; in find_msb_to_float_cast()
1423 ir_constant *c0 = new(ir) ir_constant(int(0), elements); in find_msb_to_float_cast()
1424 ir_constant *cminus1 = new(ir) ir_constant(int(-1), elements); in find_msb_to_float_cast()
1425 ir_constant *c23 = new(ir) ir_constant(int(23), elements); in find_msb_to_float_cast()
1426 ir_constant *c7F = new(ir) ir_constant(int(0x7F), elements); in find_msb_to_float_cast()
1427 ir_constant *c000000FF = new(ir) ir_constant(0x000000FFu, elements); in find_msb_to_float_cast()
1428 ir_constant *cFFFFFF00 = new(ir) ir_constant(0xFFFFFF00u, elements); in find_msb_to_float_cast()
1430 new(ir) ir_variable(glsl_type::uvec(elements), "temp", ir_var_temporary); in find_msb_to_float_cast()
1432 new(ir) ir_variable(glsl_type::vec(elements), "as_float", ir_var_temporary); in find_msb_to_float_cast()
1434 new(ir) ir_variable(glsl_type::ivec(elements), "msb", ir_var_temporary); in find_msb_to_float_cast()
1440 if (ir->operands[0]->type->base_type == GLSL_TYPE_UINT) { in find_msb_to_float_cast()
1441 i.insert_before(assign(temp, ir->operands[0])); in find_msb_to_float_cast()
1443 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in find_msb_to_float_cast()
1462 new(ir) ir_variable(glsl_type::ivec(elements), "as_int", ir_var_temporary); in find_msb_to_float_cast()
1463 ir_constant *c31 = new(ir) ir_constant(int(31), elements); in find_msb_to_float_cast()
1466 i.insert_before(assign(as_int, ir->operands[0])); in find_msb_to_float_cast()
1507 ir->operation = ir_triop_csel; in find_msb_to_float_cast()
1508 ir->init_num_operands(); in find_msb_to_float_cast()
1509 ir->operands[0] = less(msb, c0); in find_msb_to_float_cast()
1510 ir->operands[1] = cminus1; in find_msb_to_float_cast()
1511 ir->operands[2] = new(ir) ir_dereference_variable(msb); in find_msb_to_float_cast()
1546 lower_instructions_visitor::imul_high_to_mul(ir_expression *ir) in imul_high_to_mul() argument
1571 const unsigned elements = ir->operands[0]->type->vector_elements; in imul_high_to_mul()
1573 new(ir) ir_variable(glsl_type::uvec(elements), "src1", ir_var_temporary); in imul_high_to_mul()
1575 new(ir) ir_variable(glsl_type::uvec(elements), "src1h", ir_var_temporary); in imul_high_to_mul()
1577 new(ir) ir_variable(glsl_type::uvec(elements), "src1l", ir_var_temporary); in imul_high_to_mul()
1579 new(ir) ir_variable(glsl_type::uvec(elements), "src2", ir_var_temporary); in imul_high_to_mul()
1581 new(ir) ir_variable(glsl_type::uvec(elements), "src2h", ir_var_temporary); in imul_high_to_mul()
1583 new(ir) ir_variable(glsl_type::uvec(elements), "src2l", ir_var_temporary); in imul_high_to_mul()
1585 new(ir) ir_variable(glsl_type::uvec(elements), "t1", ir_var_temporary); in imul_high_to_mul()
1587 new(ir) ir_variable(glsl_type::uvec(elements), "t2", ir_var_temporary); in imul_high_to_mul()
1589 new(ir) ir_variable(glsl_type::uvec(elements), "lo", ir_var_temporary); in imul_high_to_mul()
1591 new(ir) ir_variable(glsl_type::uvec(elements), "hi", ir_var_temporary); in imul_high_to_mul()
1593 ir_constant *c0000FFFF = new(ir) ir_constant(0x0000FFFFu, elements); in imul_high_to_mul()
1594 ir_constant *c16 = new(ir) ir_constant(16u, elements); in imul_high_to_mul()
1605 if (ir->operands[0]->type->base_type == GLSL_TYPE_UINT) { in imul_high_to_mul()
1606 i.insert_before(assign(src1, ir->operands[0])); in imul_high_to_mul()
1607 i.insert_before(assign(src2, ir->operands[1])); in imul_high_to_mul()
1609 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in imul_high_to_mul()
1612 new(ir) ir_variable(glsl_type::ivec(elements), "itmp1", ir_var_temporary); in imul_high_to_mul()
1614 new(ir) ir_variable(glsl_type::ivec(elements), "itmp2", ir_var_temporary); in imul_high_to_mul()
1615 ir_constant *c0 = new(ir) ir_constant(int(0), elements); in imul_high_to_mul()
1619 i.insert_before(assign(itmp1, ir->operands[0])); in imul_high_to_mul()
1620 i.insert_before(assign(itmp2, ir->operands[1])); in imul_high_to_mul()
1623 new(ir) ir_variable(glsl_type::bvec(elements), "different_signs", in imul_high_to_mul()
1629 less(itmp2, c0->clone(ir, NULL))))); in imul_high_to_mul()
1636 i.insert_before(assign(src2l, bit_and(src2, c0000FFFF->clone(ir, NULL)))); in imul_high_to_mul()
1638 i.insert_before(assign(src2h, rshift(src2, c16->clone(ir, NULL)))); in imul_high_to_mul()
1650 i.insert_before(assign(hi, add(hi, _carry(lo, lshift(t1, c16->clone(ir, NULL)))))); in imul_high_to_mul()
1651 i.insert_before(assign(lo, add(lo, lshift(t1, c16->clone(ir, NULL))))); in imul_high_to_mul()
1653 i.insert_before(assign(hi, add(hi, _carry(lo, lshift(t2, c16->clone(ir, NULL)))))); in imul_high_to_mul()
1654 i.insert_before(assign(lo, add(lo, lshift(t2, c16->clone(ir, NULL))))); in imul_high_to_mul()
1657 assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); in imul_high_to_mul()
1659 ir->operation = ir_binop_add; in imul_high_to_mul()
1660 ir->init_num_operands(); in imul_high_to_mul()
1661 ir->operands[0] = add(hi, rshift(t1, c16->clone(ir, NULL))); in imul_high_to_mul()
1662 ir->operands[1] = rshift(t2, c16->clone(ir, NULL)); in imul_high_to_mul()
1664 assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); in imul_high_to_mul()
1666 i.insert_before(assign(hi, add(add(hi, rshift(t1, c16->clone(ir, NULL))), in imul_high_to_mul()
1667 rshift(t2, c16->clone(ir, NULL))))); in imul_high_to_mul()
1675 new(ir) ir_variable(glsl_type::ivec(elements), "neg_hi", ir_var_temporary); in imul_high_to_mul()
1676 ir_constant *c1 = new(ir) ir_constant(1u, elements); in imul_high_to_mul()
1682 ir->operation = ir_triop_csel; in imul_high_to_mul()
1683 ir->init_num_operands(); in imul_high_to_mul()
1684 ir->operands[0] = new(ir) ir_dereference_variable(different_signs); in imul_high_to_mul()
1685 ir->operands[1] = new(ir) ir_dereference_variable(neg_hi); in imul_high_to_mul()
1686 ir->operands[2] = u2i(hi); in imul_high_to_mul()
1691 lower_instructions_visitor::sqrt_to_abs_sqrt(ir_expression *ir) in sqrt_to_abs_sqrt() argument
1693 ir->operands[0] = new(ir) ir_expression(ir_unop_abs, ir->operands[0]); in sqrt_to_abs_sqrt()
1698 lower_instructions_visitor::mul64_to_mul_and_mul_high(ir_expression *ir) in mul64_to_mul_and_mul_high() argument
1704 const unsigned elements = ir->operands[0]->type->vector_elements; in mul64_to_mul_and_mul_high()
1707 ir->type->base_type == GLSL_TYPE_UINT64 ? ir_unop_pack_uint_2x32 in mul64_to_mul_and_mul_high()
1710 const glsl_type *var_type = ir->type->base_type == GLSL_TYPE_UINT64 in mul64_to_mul_and_mul_high()
1714 const glsl_type *ret_type = ir->type->base_type == GLSL_TYPE_UINT64 in mul64_to_mul_and_mul_high()
1721 new(ir) ir_variable(var_type, "msb", ir_var_temporary); in mul64_to_mul_and_mul_high()
1723 new(ir) ir_variable(var_type, "lsb", ir_var_temporary); in mul64_to_mul_and_mul_high()
1725 new(ir) ir_variable(var_type, "x", ir_var_temporary); in mul64_to_mul_and_mul_high()
1727 new(ir) ir_variable(var_type, "y", ir_var_temporary); in mul64_to_mul_and_mul_high()
1730 i.insert_before(assign(x, ir->operands[0])); in mul64_to_mul_and_mul_high()
1732 i.insert_before(assign(y, ir->operands[1])); in mul64_to_mul_and_mul_high()
1741 ir_rvalue *val = new(ir) ir_expression(ir_quadop_vector, ret_type, in mul64_to_mul_and_mul_high()
1747 ir->operation = ir_quadop_vector; in mul64_to_mul_and_mul_high()
1748 ir->init_num_operands(); in mul64_to_mul_and_mul_high()
1749 ir->operands[0] = result[0]; in mul64_to_mul_and_mul_high()
1750 ir->operands[1] = result[1]; in mul64_to_mul_and_mul_high()
1751 ir->operands[2] = result[2]; in mul64_to_mul_and_mul_high()
1752 ir->operands[3] = result[3]; in mul64_to_mul_and_mul_high()
1758 lower_instructions_visitor::visit_leave(ir_expression *ir) in visit_leave() argument
1760 switch (ir->operation) { in visit_leave()
1762 if (ir->operands[0]->type->is_double()) in visit_leave()
1763 double_dot_to_fma(ir); in visit_leave()
1766 if (ir->operands[0]->type->is_double()) in visit_leave()
1767 double_lrp(ir); in visit_leave()
1771 sub_to_add_neg(ir); in visit_leave()
1775 if (ir->operands[1]->type->is_integer_32() && lowering(INT_DIV_TO_MUL_RCP)) in visit_leave()
1776 int_div_to_mul_rcp(ir); in visit_leave()
1777 else if ((ir->operands[1]->type->is_float_16_32() && lowering(FDIV_TO_MUL_RCP)) || in visit_leave()
1778 (ir->operands[1]->type->is_double() && lowering(DDIV_TO_MUL_RCP))) in visit_leave()
1779 div_to_mul_rcp(ir); in visit_leave()
1784 exp_to_exp2(ir); in visit_leave()
1789 log_to_log2(ir); in visit_leave()
1793 if (lowering(MOD_TO_FLOOR) && ir->type->is_float_16_32_64()) in visit_leave()
1794 mod_to_floor(ir); in visit_leave()
1799 pow_to_exp2(ir); in visit_leave()
1803 if (lowering(LDEXP_TO_ARITH) && ir->type->is_float()) in visit_leave()
1804 ldexp_to_arith(ir); in visit_leave()
1805 if (lowering(DFREXP_DLDEXP_TO_ARITH) && ir->type->is_double()) in visit_leave()
1806 dldexp_to_arith(ir); in visit_leave()
1810 if (lowering(DFREXP_DLDEXP_TO_ARITH) && ir->operands[0]->type->is_double()) in visit_leave()
1811 dfrexp_exp_to_arith(ir); in visit_leave()
1815 if (lowering(DFREXP_DLDEXP_TO_ARITH) && ir->operands[0]->type->is_double()) in visit_leave()
1816 dfrexp_sig_to_arith(ir); in visit_leave()
1821 carry_to_arith(ir); in visit_leave()
1826 borrow_to_arith(ir); in visit_leave()
1831 sat_to_clamp(ir); in visit_leave()
1835 if (lowering(DOPS_TO_DFRAC) && ir->type->is_double()) in visit_leave()
1836 dtrunc_to_dfrac(ir); in visit_leave()
1840 if (lowering(DOPS_TO_DFRAC) && ir->type->is_double()) in visit_leave()
1841 dceil_to_dfrac(ir); in visit_leave()
1845 if (lowering(DOPS_TO_DFRAC) && ir->type->is_double()) in visit_leave()
1846 dfloor_to_dfrac(ir); in visit_leave()
1850 if (lowering(DOPS_TO_DFRAC) && ir->type->is_double()) in visit_leave()
1851 dround_even_to_dfrac(ir); in visit_leave()
1855 if (lowering(DOPS_TO_DFRAC) && ir->type->is_double()) in visit_leave()
1856 dsign_to_csel(ir); in visit_leave()
1861 bit_count_to_math(ir); in visit_leave()
1866 extract_to_shifts(ir); in visit_leave()
1871 insert_to_shifts(ir); in visit_leave()
1876 reverse_to_shifts(ir); in visit_leave()
1881 find_lsb_to_float_cast(ir); in visit_leave()
1886 find_msb_to_float_cast(ir); in visit_leave()
1891 imul_high_to_mul(ir); in visit_leave()
1896 (ir->type->base_type == GLSL_TYPE_INT64 || in visit_leave()
1897 ir->type->base_type == GLSL_TYPE_UINT64) && in visit_leave()
1898 (ir->operands[0]->type->base_type == GLSL_TYPE_INT || in visit_leave()
1899 ir->operands[1]->type->base_type == GLSL_TYPE_UINT)) in visit_leave()
1900 mul64_to_mul_and_mul_high(ir); in visit_leave()
1906 sqrt_to_abs_sqrt(ir); in visit_leave()