Fix test.
[oota-llvm.git] / test / FrontendC / 2005-07-20-SqrtNoErrno.c
index fd976a679331167bbb7b3971293a7e7c38d2698a..a321a3884e8b377f9c6d63968bd21ce010964ad8 100644 (file)
@@ -1,7 +1,11 @@
-// RUN: %llvmgcc %s -S -o - -fno-math-errno | gccas | llvm-dis | grep llvm.sqrt
+// RUN: %llvmgcc %s -S -o - -fno-math-errno | FileCheck %s
+// llvm.sqrt has undefined behavior on negative inputs, so it is
+// inappropriate to translate C/C++ sqrt to this.
 #include <math.h>
 
 float foo(float X) {
-  // Check that this compiles to llvm.sqrt when errno is ignored.
+// CHECK: foo
+// CHECK: sqrtf(float %1) nounwind readonly
+  // Check that this is marked readonly when errno is ignored.
   return sqrtf(X);
 }