Skip to content

Commit 1a05e2b

Browse files
committed
Add test case with multiple target-cpu
1 parent 6aab9cb commit 1a05e2b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
11+
source_filename = "file.c"
12+
13+
define dso_local signext i32 @testFunc1() #0 {
14+
entry:
15+
%retval = alloca i32, align 4
16+
store i32 0, ptr %retval, align 4
17+
ret i32 0
18+
}
19+
20+
define dso_local signext i32 @testFunc2() #1 {
21+
entry:
22+
%retval = alloca i32, align 4
23+
store i32 0, ptr %retval, align 4
24+
ret i32 0
25+
}
26+
27+
attributes #0 = { "target-cpu" = "pwr8" }
28+
attributes #1 = { "target-cpu" = "pwr10" }
29+

0 commit comments

Comments
 (0)