Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / attr-cpuspecific-renaming.cpp
blob490259f4cdb22360acc2e42e31f827432cf01517
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb %s | FileCheck %s --check-prefixes=CHECK,LIN
2 // RUN: %clang_cc1 -triple x86_64-windows-pc -emit-llvm -o - -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb %s | FileCheck %s --check-prefixes=CHECK,WIN
4 // LIN: @[[S1_NAME:.+]].ifunc = weak_odr ifunc void (ptr), ptr @[[S1_NAME]].resolver
5 // LIN: @[[S2_NAME:.+]].ifunc = weak_odr ifunc void (ptr), ptr @[[S2_NAME]].resolver
6 // WIN: $"[[S1_NAME:.+]]" = comdat any
7 // WIN: $"[[S2_NAME:.+]]" = comdat any
9 struct S1 {
10 void foo();
11 void mv();
14 void S1::foo(){}
16 __attribute__((cpu_dispatch(ivybridge, generic)))
17 void S1::mv() {}
18 // LIN: define weak_odr ptr @[[S1_NAME]].resolver
19 // WIN: define weak_odr dso_local void @"[[S1_NAME]]"(ptr
20 __attribute__((cpu_specific(generic)))
21 void S1::mv() {}
22 // CHECK: define dso_local {{.*}}void @{{\"?}}[[S1_NAME]].S{{\"?}}
23 // CHECK: define dso_local {{.*}}void @{{\"?}}[[S1_NAME]].A{{\"?}}
24 __attribute__((cpu_specific(ivybridge)))
25 void S1::mv() {}
27 struct S2 {
28 void foo();
29 void mv();
32 void S2::foo(){}
34 __attribute__((cpu_specific(generic)))
35 void S2::mv() {}
36 // CHECK: define dso_local {{.*}}void @{{\"?}}[[S2_NAME]].A{{\"?}}
37 __attribute__((cpu_dispatch(ivybridge, generic)))
38 void S2::mv() {}
39 // LIN: define weak_odr ptr @[[S2_NAME]].resolver
40 // WIN: define weak_odr dso_local void @"[[S2_NAME]]"(ptr
41 __attribute__((cpu_specific(ivybridge)))
42 void S2::mv() {}
43 // CHECK: define dso_local {{.*}}void @{{\"?}}[[S2_NAME]].S{{\"?}}