1 // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s
3 extern void foo_alias (void) __asm ("foo");
4 inline void foo (void) {
7 extern int abs_alias (int) __asm ("abs");
8 inline __attribute__ ((__always_inline__
)) int abs (int x
) {
11 extern char *strrchr_foo (const char *__s
, int __c
) __asm ("strrchr");
12 extern inline __attribute__ ((__always_inline__
)) __attribute__ ((__gnu_inline__
)) char * strrchr_foo (const char *__s
, int __c
) {
13 return __builtin_strrchr (__s
, __c
);
16 extern inline void __attribute__((always_inline
, __gnu_inline__
))
18 __builtin_prefetch(0, 0, 1);
21 extern inline __attribute__((__always_inline__
, __gnu_inline__
)) void *memchr(void *__s
, int __c
, __SIZE_TYPE__ __n
) {
22 return __builtin_memchr(__s
, __c
, __n
);
33 // CHECK-LABEL: define{{.*}} void @f()
34 // CHECK: call void @foo()
35 // CHECK: call i32 @abs(i32 noundef %0)
36 // CHECK: call ptr @strrchr(
37 // CHECK: call void @llvm.prefetch.p0(
38 // CHECK: call ptr @memchr(
41 // CHECK: declare void @foo()
42 // CHECK: declare i32 @abs(i32
43 // CHECK: declare ptr @strrchr(ptr noundef, i32 noundef)
44 // CHECK: declare ptr @memchr(
45 // CHECK: declare void @llvm.prefetch.p0(