// #target: macos-x64
module test;
import std::io;

fn void main()
{
	int a;
	io::printfn("%s", $$pow_int((double[<2>]) { 23.3, 2.1 }, 3));
	io::printfn("%s", $$reduce_add((int[<2>]) { 3, 10 }));
	io::printfn("%s", $$reduce_fadd((double[<2>]) { 3, 10 }, -0.0));
	io::printfn("%s", $$reduce_fadd((double[<2>]) { 3, 10 }, 3.2));
	io::printfn("%s", $$reduce_mul((int[<2>]) { 3, 10 }));
	io::printfn("%s", $$reduce_fmul((double[<2>]) { 3, 10 }, 3.4));
	io::printfn("%s", $$reduce_and((int[<2>]) { 3, 11 }));
	io::printfn("%s", $$reduce_or((int[<2>]) { 3, 10 }));
	io::printfn("%s", $$reduce_xor((int[<2>]) { 3, 10 }));
	io::printfn("%s", $$reduce_max((double[<2>]) { 23.2, 23.3 }));
    io::printfn("%s", $$reduce_max((int[<2>]) { -23, 32 }));
    io::printfn("%s", $$reduce_max((char[<2>]) { 4, 253 }));
    io::printfn("%s", $$reduce_min((double[<2>]) { 23.2, 23.3 }));
    io::printfn("%s", $$reduce_min((int[<2>]) { -23, 32 }));
    io::printfn("%s", $$reduce_min((char[<2>]) { 4, 253 }));

}

/* #expect: test.ll


  call <2 x double> @llvm.powi.v2f64.i32(<2 x double> <double 2.330000e+01, double 2.100000e+00>, i32 3)
  call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> <i32 3, i32 10>)
  call double @llvm.vector.reduce.fadd.v2f64(double -0.000000e+00, <2 x double> <double 3.000000e+00, double 1.000000e+01>)
  call double @llvm.vector.reduce.fadd.v2f64(double 3.200000e+00, <2 x double> <double 3.000000e+00, double 1.000000e+01>)
  call i32 @llvm.vector.reduce.mul.v2i32(<2 x i32> <i32 3, i32 10>)
  call double @llvm.vector.reduce.fmul.v2f64(double 3.400000e+00, <2 x double> <double 3.000000e+00, double 1.000000e+01>)
  call i32 @llvm.vector.reduce.and.v2i32(<2 x i32> <i32 3, i32 11>)
  call i32 @llvm.vector.reduce.or.v2i32(<2 x i32> <i32 3, i32 10>)
  call i32 @llvm.vector.reduce.xor.v2i32(<2 x i32> <i32 3, i32 10>)
  call double @llvm.vector.reduce.fmax.v2f64(<2 x double> <double 2.320000e+01, double 2.330000e+01>)
  call i32 @llvm.vector.reduce.smax.v2i32(<2 x i32> <i32 -23, i32 32>)
  call i8 @llvm.vector.reduce.umax.v2i8(<2 x i8> <i8 4, i8 -3>)
  call double @llvm.vector.reduce.fmin.v2f64(<2 x double> <double 2.320000e+01, double 2.330000e+01>)
  call i32 @llvm.vector.reduce.smin.v2i32(<2 x i32> <i32 -23, i32 32>)
  call i8 @llvm.vector.reduce.umin.v2i8(<2 x i8> <i8 4, i8 -3>)
