[clang] 1f30e3d - [OpenACC][CIR] Fix 'copy' tests after deferred emission patch.
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 6 06:14:42 PDT 2025
Author: erichkeane
Date: 2025-06-06T06:14:38-07:00
New Revision: 1f30e3d123ee7f7e0a98dc4057b5d280a490c723
URL: https://github.com/llvm/llvm-project/commit/1f30e3d123ee7f7e0a98dc4057b5d280a490c723
DIFF: https://github.com/llvm/llvm-project/commit/1f30e3d123ee7f7e0a98dc4057b5d280a490c723.diff
LOG: [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.
Added:
Modified:
clang/test/CIR/CodeGenOpenACC/combined-copy.cpp
clang/test/CIR/CodeGenOpenACC/compute-copy.cpp
Removed:
################################################################################
diff --git a/clang/test/CIR/CodeGenOpenACC/combined-copy.cpp b/clang/test/CIR/CodeGenOpenACC/combined-copy.cpp
index c98fccb0f3b82..525cf3de187e5 100644
--- a/clang/test/CIR/CodeGenOpenACC/combined-copy.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/combined-copy.cpp
@@ -214,6 +214,11 @@ void InlineFunc() {
void OutlineFunc();
};
+void InlineUse() {
+ StructTy s;
+ s.InlineFunc();
+}
+
void StructTy::OutlineFunc() {
// CHECK: cir.func {{.*}}OutlineFunc{{.*}}
// CHECK-NEXT: %[[THIS:.*]] = cir.alloca !cir.ptr<!rec_StructTy>, !cir.ptr<!cir.ptr<!rec_StructTy>>, ["this", init]
diff --git a/clang/test/CIR/CodeGenOpenACC/compute-copy.cpp b/clang/test/CIR/CodeGenOpenACC/compute-copy.cpp
index 6c5d6a7a617b4..e1692f5a5f3c8 100644
--- a/clang/test/CIR/CodeGenOpenACC/compute-copy.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/compute-copy.cpp
@@ -178,6 +178,11 @@ void InlineFunc() {
void OutlineFunc();
};
+void InlineUse() {
+ StructTy s;
+ s.InlineFunc();
+}
+
void StructTy::OutlineFunc() {
// CHECK: cir.func {{.*}}OutlineFunc{{.*}}
// CHECK-NEXT: %[[THIS:.*]] = cir.alloca !cir.ptr<!rec_StructTy>, !cir.ptr<!cir.ptr<!rec_StructTy>>, ["this", init]
More information about the cfe-commits
mailing list