blob: 96761e4cfb2ecd27e9e761c72750a34c5df32a7c [file] [log] [blame]
Nuno Lopes060ddb02012-05-09 21:21:49 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -o - | FileCheck %s
Eric Christopherb0257342011-07-26 21:42:32 +00002// llvm.sqrt has undefined behavior on negative inputs, so it is
3// inappropriate to translate C/C++ sqrt to this.
4float sqrtf(float x);
5float foo(float X) {
6 // CHECK: foo
Eric Christopherd4840402011-07-26 22:07:13 +00007 // CHECK: call float @sqrtf(float %
Eric Christopherb0257342011-07-26 21:42:32 +00008 // Check that this is marked readonly when errno is ignored.
9 return sqrtf(X);
10}