Mercurial > hg > CbC > CbC_llvm
comparison clang/test/CodeGen/alias.c @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | 79ff65ed7e25 |
children | 1f2b6ac9f198 |
comparison
equal
deleted
inserted
replaced
232:70dce7da266c | 236:c4bab56944e8 |
---|---|
1 // REQUIRES: arm-registered-target | 1 // REQUIRES: arm-registered-target |
2 // RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=CHECKBASIC %s | 2 // RUN: %clang_cc1 -no-opaque-pointers -triple i386-pc-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=CHECKBASIC %s |
3 // RUN: %clang_cc1 -triple armv7a-eabi -mfloat-abi hard -emit-llvm -o - %s | FileCheck -check-prefix=CHECKCC %s | 3 // RUN: %clang_cc1 -no-opaque-pointers -triple armv7a-eabi -mfloat-abi hard -emit-llvm -o - %s | FileCheck -check-prefix=CHECKCC %s |
4 // RUN: %clang_cc1 -triple armv7a-eabi -mfloat-abi hard -S -o - %s | FileCheck -check-prefix=CHECKASM %s | 4 // RUN: %clang_cc1 -no-opaque-pointers -triple armv7a-eabi -mfloat-abi hard -S -o - %s | FileCheck -check-prefix=CHECKASM %s |
5 // RUN: %clang_cc1 -triple aarch64-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=CHECKGLOBALS %s | 5 // RUN: %clang_cc1 -no-opaque-pointers -triple aarch64-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=CHECKGLOBALS %s |
6 | 6 |
7 int g0; | 7 int g0; |
8 // CHECKBASIC-DAG: @g0 ={{.*}} global i32 0 | 8 // CHECKBASIC-DAG: @g0 ={{.*}} global i32 0 |
9 // CHECKASM-DAG: .bss | 9 // CHECKASM-DAG: .bss |
10 // CHECKASM-DAG: .globl g0 | 10 // CHECKASM-DAG: .globl g0 |
70 static int inner(int a) { return 0; } | 70 static int inner(int a) { return 0; } |
71 static int inner_weak(int a) { return 0; } | 71 static int inner_weak(int a) { return 0; } |
72 extern __typeof(inner) inner_a __attribute__((alias("inner"))); | 72 extern __typeof(inner) inner_a __attribute__((alias("inner"))); |
73 static __typeof(inner_weak) inner_weak_a __attribute__((weakref, alias("inner_weak"))); | 73 static __typeof(inner_weak) inner_weak_a __attribute__((weakref, alias("inner_weak"))); |
74 // CHECKCC: @inner_a ={{.*}} alias i32 (i32), i32 (i32)* @inner | 74 // CHECKCC: @inner_a ={{.*}} alias i32 (i32), i32 (i32)* @inner |
75 // CHECKCC: define internal arm_aapcs_vfpcc i32 @inner(i32 %a) [[NUW:#[0-9]+]] { | 75 // CHECKCC: define internal arm_aapcs_vfpcc i32 @inner(i32 noundef %a) [[NUW:#[0-9]+]] { |
76 | 76 |
77 int outer(int a) { return inner(a); } | 77 int outer(int a) { return inner(a); } |
78 // CHECKCC: define{{.*}} arm_aapcs_vfpcc i32 @outer(i32 %a) [[NUW]] { | 78 // CHECKCC: define{{.*}} arm_aapcs_vfpcc i32 @outer(i32 noundef %a) [[NUW]] { |
79 // CHECKCC: call arm_aapcs_vfpcc i32 @inner(i32 %{{.*}}) | 79 // CHECKCC: call arm_aapcs_vfpcc i32 @inner(i32 noundef %{{.*}}) |
80 | 80 |
81 int outer_weak(int a) { return inner_weak_a(a); } | 81 int outer_weak(int a) { return inner_weak_a(a); } |
82 // CHECKCC: define{{.*}} arm_aapcs_vfpcc i32 @outer_weak(i32 %a) [[NUW]] { | 82 // CHECKCC: define{{.*}} arm_aapcs_vfpcc i32 @outer_weak(i32 noundef %a) [[NUW]] { |
83 // CHECKCC: call arm_aapcs_vfpcc i32 @inner_weak(i32 %{{.*}}) | 83 // CHECKCC: call arm_aapcs_vfpcc i32 @inner_weak(i32 noundef %{{.*}}) |
84 // CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 %a) [[NUW]] { | 84 // CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 noundef %a) [[NUW]] { |
85 | 85 |
86 // CHECKBASIC: attributes [[NUW]] = { noinline nounwind{{.*}} } | 86 // CHECKBASIC: attributes [[NUW]] = { noinline nounwind{{.*}} } |
87 | 87 |
88 // CHECKCC: attributes [[NUW]] = { noinline nounwind{{.*}} } | 88 // CHECKCC: attributes [[NUW]] = { noinline nounwind{{.*}} } |
89 | 89 |