1; RUN: opt < %s -mtriple=x86_64-unknown-unknown -S -inline | FileCheck %s
2
3define i32 @func_target_cpu_base() #0 {
4  ret i32 0
5}
6
7; CHECK-LABEL: @target_cpu_k8_call_target_cpu_base(
8; CHECK-NEXT: ret i32 0
9define i32 @target_cpu_k8_call_target_cpu_base() #1 {
10  %call = call i32 @func_target_cpu_base()
11  ret i32 %call
12}
13
14; CHECK-LABEL: @target_cpu_target_nehalem_call_target_cpu_base(
15; CHECK-NEXT: ret i32 0
16define i32 @target_cpu_target_nehalem_call_target_cpu_base() #2 {
17  %call = call i32 @func_target_cpu_base()
18  ret i32 %call
19}
20
21; CHECK-LABEL: @target_cpu_target_goldmont_call_target_cpu_base(
22; CHECK-NEXT: ret i32 0
23define i32 @target_cpu_target_goldmont_call_target_cpu_base() #3 {
24  %call = call i32 @func_target_cpu_base()
25  ret i32 %call
26}
27
28define i32 @func_target_cpu_nocona() #4 {
29  ret i32 0
30}
31
32; CHECK-LABEL: @target_cpu_target_base_call_target_cpu_nocona(
33; CHECK-NEXT: ret i32 0
34define i32 @target_cpu_target_base_call_target_cpu_nocona() #0 {
35  %call = call i32 @func_target_cpu_nocona()
36  ret i32 %call
37}
38
39attributes #0 = { nounwind "target-cpu"="x86-64" }
40attributes #1 = { nounwind "target-cpu"="k8" }
41attributes #2 = { nounwind "target-cpu"="nehalem" }
42attributes #3 = { nounwind "target-cpu"="goldmont" }
43attributes #4 = { nounwind "target-cpu"="nocona" "target-features"="-sse3" }
44