// #target: macos-x64
// #safe: yes
module test;
import libc;

fn void testf()
{
    float[<4>] y = { 1, 2, 3, 4 };
    float[<4>] z = { 2, 2, 2, -100 };
    float[<4>] w = y + z;
    w = y / z;
}


fn void testi()
{
    int[<4>] y = { 1, 2, 3, 4 };
    int[<4>] z = { 2, 2, 2, -100 };
    int[<4>] w = y / z;
    w = z >> y;
    w = z << y;
}

/* #expect: test.ll


define void @test.testf() #0 {
entry:
  %y = alloca <4 x float>, align 16
  %z = alloca <4 x float>, align 16
  %w = alloca <4 x float>, align 16
  store <4 x float> <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00>, ptr %y, align 16
  store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float -1.000000e+02>, ptr %z, align 16
  %0 = load <4 x float>, ptr %y, align 16
  %1 = load <4 x float>, ptr %z, align 16
  %fadd = fadd <4 x float> %0, %1
  store <4 x float> %fadd, ptr %w, align 16
  %2 = load <4 x float>, ptr %y, align 16
  %3 = load <4 x float>, ptr %z, align 16
  %4 = call <4 x float> @llvm.fabs.v4f32(<4 x float> %3)
  %5 = call float @llvm.vector.reduce.fmin.v4f32(<4 x float> %4)
  %zero = fcmp ueq float %5, 0.000000e+00
  %6 = call i1 @llvm.expect.i1(i1 %zero, i1 false)
  br i1 %6, label %panic, label %checkok

checkok:                                          ; preds = %entry
  %fdiv = fdiv <4 x float> %2, %3
  store <4 x float> %fdiv, ptr %w, align 16
  ret void

panic:                                            ; preds = %entry
  %7 = load ptr, ptr @std.core.builtin.panic, align 8
  call void %7(ptr @.panic_msg, i64 17, ptr @.file, i64 14, ptr @.func, i64 5, i32 9)
  unreachable
}
