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