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]


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to