blob: f40f61d27f31be1b453a8200b7c6ce8bc493ff9b [file] [log] [blame]
Eric Christopherb0257342011-07-26 21:42:32 +00001// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2// 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}