1 // RUN: %clang_cc1 -triple s390x-linux-gnu -O2 -emit-llvm \
2 // RUN: -o - %s 2>&1 | FileCheck %s
3 // REQUIRES: systemz-registered-target
9 unsigned long fun_BD12_Q() {
10 // CHECK-LABEL: define{{.*}} i64 @fun_BD12_Q()
11 // CHECK: call i64 asm "lay $0, $1", "=r,^ZQ"(ptr nonnull %arrayidx)
12 asm("lay %0, %1" : "=r" (Addr
) : "ZQ" (&A
[100]));
16 unsigned long fun_BD12_R() {
17 // CHECK-LABEL: define{{.*}} i64 @fun_BD12_R()
18 // CHECK: call i64 asm "lay $0, $1", "=r,^ZR"(ptr nonnull %arrayidx)
19 asm("lay %0, %1" : "=r" (Addr
) : "ZR" (&A
[100]));
23 unsigned long fun_BD12_S() {
24 // CHECK-LABEL: define{{.*}} i64 @fun_BD12_S()
25 // CHECK: call i64 asm "lay $0, $1", "=r,^ZS"(ptr nonnull %arrayidx)
26 asm("lay %0, %1" : "=r" (Addr
) : "ZS" (&A
[100]));
30 unsigned long fun_BD12_T() {
31 // CHECK-LABEL: define{{.*}} i64 @fun_BD12_T()
32 // CHECK: call i64 asm "lay $0, $1", "=r,^ZT"(ptr nonnull %arrayidx)
33 asm("lay %0, %1" : "=r" (Addr
) : "ZT" (&A
[100]));
37 unsigned long fun_BD12_p() {
38 // CHECK-LABEL: define{{.*}} i64 @fun_BD12_p()
39 // CHECK: call i64 asm "lay $0, $1", "=r,p"(ptr nonnull %arrayidx)
40 asm("lay %0, %1" : "=r" (Addr
) : "p" (&A
[100]));
44 unsigned long fun_BDX12_Q() {
45 // CHECK-LABEL: define{{.*}} i64 @fun_BDX12_Q()
46 // CHECK: call i64 asm "lay $0, $1", "=r,^ZQ"(ptr %arrayidx)
47 asm("lay %0, %1" : "=r" (Addr
) : "ZQ" (&A
[Idx
+ 100]));
51 unsigned long fun_BDX12_R() {
52 // CHECK-LABEL: define{{.*}} i64 @fun_BDX12_R()
53 // CHECK: call i64 asm "lay $0, $1", "=r,^ZR"(ptr %arrayidx)
54 asm("lay %0, %1" : "=r" (Addr
) : "ZR" (&A
[Idx
+ 100]));
58 unsigned long fun_BDX12_S() {
59 // CHECK-LABEL: define{{.*}} i64 @fun_BDX12_S()
60 // CHECK: call i64 asm "lay $0, $1", "=r,^ZS"(ptr %arrayidx)
61 asm("lay %0, %1" : "=r" (Addr
) : "ZS" (&A
[Idx
+ 100]));
65 unsigned long fun_BDX12_T() {
66 // CHECK-LABEL: define{{.*}} i64 @fun_BDX12_T()
67 // CHECK: call i64 asm "lay $0, $1", "=r,^ZT"(ptr %arrayidx)
68 asm("lay %0, %1" : "=r" (Addr
) : "ZT" (&A
[Idx
+ 100]));
72 unsigned long fun_BDX12_p() {
73 // CHECK-LABEL: define{{.*}} i64 @fun_BDX12_p()
74 // CHECK: call i64 asm "lay $0, $1", "=r,p"(ptr %arrayidx)
75 asm("lay %0, %1" : "=r" (Addr
) : "p" (&A
[Idx
+ 100]));
79 unsigned long fun_BD20_Q() {
80 // CHECK-LABEL: define{{.*}} i64 @fun_BD20_Q()
81 // CHECK: call i64 asm "lay $0, $1", "=r,^ZQ"(ptr nonnull %arrayidx)
82 asm("lay %0, %1" : "=r" (Addr
) : "ZQ" (&A
[1000]));
86 unsigned long fun_BD20_R() {
87 // CHECK-LABEL: define{{.*}} i64 @fun_BD20_R()
88 // CHECK: call i64 asm "lay $0, $1", "=r,^ZR"(ptr nonnull %arrayidx)
89 asm("lay %0, %1" : "=r" (Addr
) : "ZR" (&A
[1000]));
93 unsigned long fun_BD20_S() {
94 // CHECK-LABEL: define{{.*}} i64 @fun_BD20_S()
95 // CHECK: call i64 asm "lay $0, $1", "=r,^ZS"(ptr nonnull %arrayidx)
96 asm("lay %0, %1" : "=r" (Addr
) : "ZS" (&A
[1000]));
100 unsigned long fun_BD20_T() {
101 // CHECK-LABEL: define{{.*}} i64 @fun_BD20_T()
102 // CHECK: call i64 asm "lay $0, $1", "=r,^ZT"(ptr nonnull %arrayidx)
103 asm("lay %0, %1" : "=r" (Addr
) : "ZT" (&A
[1000]));
107 unsigned long fun_BD20_p() {
108 // CHECK-LABEL: define{{.*}} i64 @fun_BD20_p()
109 // CHECK: call i64 asm "lay $0, $1", "=r,p"(ptr nonnull %arrayidx)
110 asm("lay %0, %1" : "=r" (Addr
) : "p" (&A
[1000]));
114 unsigned long fun_BDX20_Q() {
115 // CHECK-LABEL: define{{.*}} i64 @fun_BDX20_Q()
116 // CHECK: call i64 asm "lay $0, $1", "=r,^ZQ"(ptr %arrayidx)
117 asm("lay %0, %1" : "=r" (Addr
) : "ZQ" (&A
[Idx
+ 1000]));
121 unsigned long fun_BDX20_R() {
122 // CHECK-LABEL: define{{.*}} i64 @fun_BDX20_R()
123 // CHECK: call i64 asm "lay $0, $1", "=r,^ZR"(ptr %arrayidx)
124 asm("lay %0, %1" : "=r" (Addr
) : "ZR" (&A
[Idx
+ 1000]));
128 unsigned long fun_BDX20_S() {
129 // CHECK-LABEL: define{{.*}} i64 @fun_BDX20_S()
130 // CHECK: call i64 asm "lay $0, $1", "=r,^ZS"(ptr %arrayidx)
131 asm("lay %0, %1" : "=r" (Addr
) : "ZS" (&A
[Idx
+ 1000]));
135 unsigned long fun_BDX20_T() {
136 // CHECK-LABEL: define{{.*}} i64 @fun_BDX20_T()
137 // CHECK: call i64 asm "lay $0, $1", "=r,^ZT"(ptr %arrayidx)
138 asm("lay %0, %1" : "=r" (Addr
) : "ZT" (&A
[Idx
+ 1000]));
142 unsigned long fun_BDX20_p() {
143 // CHECK-LABEL: define{{.*}} i64 @fun_BDX20_p()
144 // CHECK: call i64 asm "lay $0, $1", "=r,p"(ptr %arrayidx)
145 asm("lay %0, %1" : "=r" (Addr
) : "p" (&A
[Idx
+ 1000]));