// #target: macos-x64
module simple_float_sub_neg;

fn double test(double a, double b, double c, double d)
{
  return -(a-b) - (c-d);
}

/* #expect: simple_float_sub_neg.ll

define double @simple_float_sub_neg.test(double %0, double %1, double %2, double %3) #0 {
entry:
  %fsub = fsub double %0, %1
  %fneg = fneg double %fsub
  %fsub1 = fsub double %2, %3
  %fsub2 = fsub double %fneg, %fsub1
  ret double %fsub2
}
