Eli Bendersky | aefa5e2 | 2013-07-23 00:13:01 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fno-math-builtin -emit-llvm -o - %s | FileCheck %s |
| 2 | |
| 3 | // Check that the -fno-math-builtin option for -cc1 is working properly, |
| 4 | // by disabling just math builtin generation (other lib functions will |
| 5 | // be generated as builtins). |
| 6 | |
| 7 | extern char *p1, *p2; |
| 8 | |
| 9 | double pow(double, double); |
| 10 | void *memcpy(void *, const void *, unsigned long); |
| 11 | |
| 12 | double foo(double a, double b) { |
| 13 | memcpy(p1, p2, (unsigned long) b); |
| 14 | // CHECK: call void @llvm.memcpy |
| 15 | return pow(a, b); |
| 16 | // CHECK: call double @pow |
| 17 | } |
| 18 | |