OSDN Git Service

[ConstantFold] Remove test checking that we don't constant-fold sqrt(-2).
authorJustin Lebar <jlebar@google.com>
Sat, 21 Jan 2017 02:02:27 +0000 (02:02 +0000)
committerJustin Lebar <jlebar@google.com>
Sat, 21 Jan 2017 02:02:27 +0000 (02:02 +0000)
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

test/Transforms/InstCombine/constant-fold-math.ll

index 6eb371a..50cd607 100644 (file)
@@ -45,13 +45,4 @@ define double @constant_fold_fmuladd_f64() #0 {
   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 }