1 | // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LINUX |
2 | // RUN: %clang_cc1 -triple x86_64-windows-pc -fms-compatibility -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WINDOWS |
3 | |
4 | struct S { |
5 | __attribute__((cpu_specific(atom))) |
6 | void Func(){} |
7 | __attribute__((cpu_dispatch(ivybridge,atom))) |
8 | void Func(){} |
9 | }; |
10 | |
11 | void foo() { |
12 | S s; |
13 | s.Func(); |
14 | } |
15 | |
16 | // LINUX: define void (%struct.S*)* @_ZN1S4FuncEv.resolver |
17 | // LINUX: ret void (%struct.S*)* @_ZN1S4FuncEv.S |
18 | // LINUX: ret void (%struct.S*)* @_ZN1S4FuncEv.O |
19 | // LINUX: declare void @_ZN1S4FuncEv.S |
20 | // LINUX: define linkonce_odr void @_ZN1S4FuncEv.O |
21 | |
22 | // WINDOWS: define dso_local void @"?Func@S@@QEAAXXZ"(%struct.S*) |
23 | // WINDOWS: musttail call void @"?Func@S@@QEAAXXZ.S"(%struct.S* %0) |
24 | // WINDOWS: musttail call void @"?Func@S@@QEAAXXZ.O"(%struct.S* %0) |
25 | // WINDOWS: declare dso_local void @"?Func@S@@QEAAXXZ.S" |
26 | // WINDOWS: define linkonce_odr dso_local void @"?Func@S@@QEAAXXZ.O" |
27 | |