[cfe-commits] r136128 - /cfe/trunk/test/CodeGen/2009-09-24-SqrtErrno.c

Eric Christopher echristo at apple.com
Tue Jul 26 13:31:17 PDT 2011


Author: echristo
Date: Tue Jul 26 15:31:17 2011
New Revision: 136128

URL: http://llvm.org/viewvc/llvm-project?rev=136128&view=rev
Log:
Migrate CodeGen/2009-09-24-SqrtErrno.c from test/FrontendC with changes
to avoid header inclusions.

Added:
    cfe/trunk/test/CodeGen/2009-09-24-SqrtErrno.c

Added: cfe/trunk/test/CodeGen/2009-09-24-SqrtErrno.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-09-24-SqrtErrno.c?rev=136128&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/2009-09-24-SqrtErrno.c (added)
+++ cfe/trunk/test/CodeGen/2009-09-24-SqrtErrno.c Tue Jul 26 15:31:17 2011
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -fmath-errno | FileCheck %s
+// llvm.sqrt has undefined behavior on negative inputs, so it is
+// inappropriate to translate C/C++ sqrt to this.
+
+float sqrtf(float x);
+float foo(float X) {
+// CHECK: foo
+// CHECK-NOT: readonly
+// CHECK: call float @sqrtf
+  // Check that this is not marked readonly when errno is used.
+  return sqrtf(X);
+}





More information about the cfe-commits mailing list