[llvm] r292701 - [ConstantFold] Remove test checking that we don't constant-fold sqrt(-2).

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 18:02:27 PST 2017


Author: jlebar
Date: Fri Jan 20 20:02:27 2017
New Revision: 292701

URL: http://llvm.org/viewvc/llvm-project?rev=292701&view=rev
Log:
[ConstantFold] Remove test checking that we don't constant-fold sqrt(-2).

This depended on libm's errno behavior (we constant fold iff libm's
sqrt(-2) does not set errno) and was breaking on mac.

Modified:
    llvm/trunk/test/Transforms/InstCombine/constant-fold-math.ll

Modified: llvm/trunk/test/Transforms/InstCombine/constant-fold-math.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/constant-fold-math.ll?rev=292701&r1=292700&r2=292701&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/constant-fold-math.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/constant-fold-math.ll Fri Jan 20 20:02:27 2017
@@ -45,13 +45,4 @@ define double @constant_fold_fmuladd_f64
   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 }




More information about the llvm-commits mailing list