xref: /llvm-project/llvm/test/CodeGen/PowerPC/aix-cpu-version-multifunction.ll (revision f31099ce581d33fdb64e35fee4b56d0a1145cab1)
1; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff  < %s | FileCheck %s
2
3; For the .machine directive emitted on AIX, the "target-cpu" attribute that is
4; the newest will be used as the CPU for the module (in this case, PWR10).
5
6; CHECK:      .file "file.c"
7; CHECK-NEXT: .csect ..text..[PR],5
8; CHECK-NEXT: .rename ..text..[PR],""
9; CHECK-NEXT: .machine "PWR10"
10; CHECK-NOT:  .machine "PWR8"
11
12source_filename = "file.c"
13
14define dso_local signext i32 @testFunc1() #0 {
15entry:
16  %retval = alloca i32, align 4
17  store i32 0, ptr %retval, align 4
18  ret i32 0
19}
20
21define dso_local signext i32 @testFunc2() #1 {
22entry:
23  %retval = alloca i32, align 4
24  store i32 0, ptr %retval, align 4
25  ret i32 0
26}
27
28attributes #0 = { "target-cpu" = "pwr8" }
29attributes #1 = { "target-cpu" = "pwr10" }
30
31