Skip to content

Commit d3f8eab

Browse files
author
Kai Luo
committed
[PowerPC] Add test to show alignment of toc-data symbol is changed. NFC.
After O3 opt pipeline, the alignment of toc-data symbol is changed which is unexpected.
1 parent 7091dfc commit d3f8eab

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
; RUN: opt -S -passes='default<O3>' < %s | FileCheck %s
2+
3+
target datalayout = "E-m:a-p:32:32-Fi32-i64:64-n32"
4+
target triple = "powerpc-ibm-aix7.2.0.0"
5+
6+
%struct.widget = type { i8, i8, i8 }
7+
8+
; CHECK: @global = {{.*}}constant %struct.widget { i8 4, i8 0, i8 0 }, align 8 #0
9+
@global = constant %struct.widget { i8 4, i8 0, i8 0 }, align 4 #0
10+
11+
define void @baz() #1 {
12+
bb:
13+
call void @snork(ptr @global)
14+
ret void
15+
}
16+
17+
define void @snork(ptr byval(%struct.widget) %arg) #1 {
18+
bb:
19+
%load = load volatile ptr, ptr null, align 4
20+
ret void
21+
}
22+
23+
attributes #0 = { "toc-data" }
24+
attributes #1 = { "target-cpu"="pwr7" "target-features"="+altivec,+bpermd,+extdiv,+isa-v206-instructions,+vsx,-aix-shared-lib-tls-model-opt,-aix-small-local-dynamic-tls,-aix-small-local-exec-tls,-crbits,-crypto,-direct-move,-htm,-isa-v207-instructions,-isa-v30-instructions,-power8-vector,-power9-vector,-privileged,-quadword-atomics,-rop-protect,-spe" }

0 commit comments

Comments
 (0)