This depended on libm's errno behavior (we constant fold iff libm's
sqrt(-2) does not set errno) and was breaking on mac.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292701
91177308-0d34-0410-b5e6-
96231b3b80d8
ret double %x
}
-; Currently we don't constant-fold intrinsics whose corresponding libcalls
-; raise an fp exception.
-; CHECK-LABEL: @bad_sqrt
-; CHECK-NEXT: call double @llvm.sqrt.f64(double -2
-define double @bad_sqrt() {
- %x = call double @llvm.sqrt.f64(double -2.000000e+00)
- ret double %x
-}
-
attributes #0 = { nounwind readnone }