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 // CHECK: declare i32 @printf(ptr noundef, ...)
12 // CHECK: call void @exit
18 // CHECK: call ptr @strstr{{.*}} [[NUW:#[0-9]+]]
19 char* f2(char* a
, char* b
) {
20 return __builtin_strstr(a
, b
);
23 // frexp is NOT readnone. It writes to its pointer argument.
24 // <rdar://problem/10070234>
27 // CHECK: call double @frexp(double noundef %
28 // CHECK-NOT: readnone
29 // CHECK: call float @frexpf(float noundef %
30 // CHECK-NOT: readnone
31 // CHECK: call double @frexpl(double noundef %
32 // CHECK-NOT: readnone
34 // Same thing for modf and friends.
36 // CHECK: call double @modf(double noundef %
37 // CHECK-NOT: readnone
38 // CHECK: call float @modff(float noundef %
39 // CHECK-NOT: readnone
40 // CHECK: call double @modfl(double noundef %
41 // CHECK-NOT: readnone
43 // CHECK: call double @remquo(double noundef %
44 // CHECK-NOT: readnone
45 // CHECK: call float @remquof(float noundef %
46 // CHECK-NOT: readnone
47 // CHECK: call double @remquol(double noundef %
48 // CHECK-NOT: readnone
52 __builtin_frexp(x
, &e
);
53 __builtin_frexpf(x
, &e
);
54 __builtin_frexpl(x
, &e
);
55 __builtin_modf(x
, &e
);
56 __builtin_modff(x
, &e
);
57 __builtin_modfl(x
, &e
);
58 __builtin_remquo(x
, x
, &e
);
59 __builtin_remquof(x
, x
, &e
);
60 __builtin_remquol(x
, x
, &e
);
64 // CHECK: attributes [[NUW]] = { nounwind{{.*}} }