1 // REQUIRES: arm-registered-target
2 // RUN: %clang_cc1 -triple arm-unknown-linux-gnueabi -emit-llvm -o - %s | FileCheck %s
4 int printf(const char *, ...);
7 float frexpf(float, int*);
8 double frexp(double, int*);
9 long double frexpl(long double, int*);
11 // CHECK: declare i32 @printf(ptr noundef, ...)
16 // CHECK: call void @exit
22 // CHECK: call ptr @strstr{{.*}} [[NUW:#[0-9]+]]
23 char* f2(char* a
, char* b
) {
24 return __builtin_strstr(a
, b
);
27 // frexp is NOT readnone. It writes to its pointer argument.
30 // CHECK: call double @frexp(double noundef %
31 // CHECK-NOT: readnone
32 // CHECK: call float @frexpf(float noundef %
33 // CHECK-NOT: readnone
34 // CHECK: call double @frexpl(double noundef %
35 // CHECK-NOT: readnone
37 // Same thing for modf and friends.
39 // CHECK: call double @modf(double noundef %
40 // CHECK-NOT: readnone
41 // CHECK: call float @modff(float noundef %
42 // CHECK-NOT: readnone
43 // CHECK: call double @modfl(double noundef %
44 // CHECK-NOT: readnone
46 // CHECK: call double @remquo(double noundef %
47 // CHECK-NOT: readnone
48 // CHECK: call float @remquof(float noundef %
49 // CHECK-NOT: readnone
50 // CHECK: call double @remquol(double noundef %
51 // CHECK-NOT: readnone
58 __builtin_modf(x
, &e
);
59 __builtin_modff(x
, &e
);
60 __builtin_modfl(x
, &e
);
61 __builtin_remquo(x
, x
, &e
);
62 __builtin_remquof(x
, x
, &e
);
63 __builtin_remquol(x
, x
, &e
);
67 // CHECK: attributes [[NUW]] = { nounwind{{.*}} }