| // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-attributes --filter "call " --include-generated-funcs --version 6 | |
| // RUN: %clang_cc1 -triple x86_64 -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s | |
| typedef unsigned long size_t; | |
| extern inline __attribute__((always_inline)) __attribute__((gnu_inline)) | |
| int memcmp(const void *a, const void *b, size_t c) { | |
| return __builtin_memcmp(a, b, c); | |
| } | |
| int bar(const void *a, const void *b, size_t c) { | |
| return memcmp(a, b, c); | |
| } | |
| // CHECK: Function Attrs: noinline nounwind optnone | |
| // CHECK-LABEL: define dso_local i32 @bar( | |
| // CHECK-SAME: ptr noundef [[A:%.*]], ptr noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR0:[0-9]+]] { | |
| // CHECK: [[CALL:%.*]] = call i32 @memcmp.inline(ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]], i64 noundef [[TMP2:%.*]]) | |
| // | |
| // | |
| // CHECK: Function Attrs: alwaysinline nobuiltin nounwind | |
| // CHECK-LABEL: define internal i32 @memcmp.inline( | |
| // CHECK-SAME: ptr noundef [[A:%.*]], ptr noundef [[B:%.*]], i64 noundef [[C:%.*]]) #[[ATTR2:[0-9]+]] { | |
| // CHECK: [[CALL:%.*]] = call i32 @memcmp(ptr noundef [[TMP0:%.*]], ptr noundef [[TMP1:%.*]], i64 noundef [[TMP2:%.*]]) #[[ATTR3:[0-9]+]] | |
| // |