Skip to content

Commit 1f30e3d

Browse files
committed
[OpenACC][CIR] Fix 'copy' tests after deferred emission patch.
The patch #142998 crossed in the air with #142862. This resulted in 2 of the tests from the former to not have the inlined function emitted. This patch adds an additional function to force these to be emitted.
1 parent efc7078 commit 1f30e3d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

clang/test/CIR/CodeGenOpenACC/combined-copy.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ void InlineFunc() {
214214
void OutlineFunc();
215215
};
216216

217+
void InlineUse() {
218+
StructTy s;
219+
s.InlineFunc();
220+
}
221+
217222
void StructTy::OutlineFunc() {
218223
// CHECK: cir.func {{.*}}OutlineFunc{{.*}}
219224
// CHECK-NEXT: %[[THIS:.*]] = cir.alloca !cir.ptr<!rec_StructTy>, !cir.ptr<!cir.ptr<!rec_StructTy>>, ["this", init]

clang/test/CIR/CodeGenOpenACC/compute-copy.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ void InlineFunc() {
178178
void OutlineFunc();
179179
};
180180

181+
void InlineUse() {
182+
StructTy s;
183+
s.InlineFunc();
184+
}
185+
181186
void StructTy::OutlineFunc() {
182187
// CHECK: cir.func {{.*}}OutlineFunc{{.*}}
183188
// CHECK-NEXT: %[[THIS:.*]] = cir.alloca !cir.ptr<!rec_StructTy>, !cir.ptr<!cir.ptr<!rec_StructTy>>, ["this", init]

0 commit comments

Comments
 (0)