Nuno Lopes | 060ddb0 | 2012-05-09 21:21:49 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -o - | FileCheck %s |
Eric Christopher | b025734 | 2011-07-26 21:42:32 +0000 | [diff] [blame] | 2 | // llvm.sqrt has undefined behavior on negative inputs, so it is |
| 3 | // inappropriate to translate C/C++ sqrt to this. |
| 4 | float sqrtf(float x); |
| 5 | float foo(float X) { |
| 6 | // CHECK: foo |
Eric Christopher | d484040 | 2011-07-26 22:07:13 +0000 | [diff] [blame] | 7 | // CHECK: call float @sqrtf(float % |
Eric Christopher | b025734 | 2011-07-26 21:42:32 +0000 | [diff] [blame] | 8 | // Check that this is marked readonly when errno is ignored. |
| 9 | return sqrtf(X); |
| 10 | } |