[clang] 126db46 - [OpenMP][FIX] Adjust to clang tests after D136740

Johannes Doerfert via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 26 12:34:08 PDT 2022


Author: Johannes Doerfert
Date: 2022-10-26T12:33:55-07:00
New Revision: 126db4674aa54a37af4349d39f22e506b93d15de

URL: https://github.com/llvm/llvm-project/commit/126db4674aa54a37af4349d39f22e506b93d15de
DIFF: https://github.com/llvm/llvm-project/commit/126db4674aa54a37af4349d39f22e506b93d15de.diff

LOG: [OpenMP][FIX] Adjust to clang tests after D136740

Added: 
    

Modified: 
    clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c
    clang/test/OpenMP/remarks_parallel_in_target_state_machine.c

Removed: 
    


################################################################################
diff  --git a/clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c b/clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c
index e1772158474ae..c3fd99c64bd51 100644
--- a/clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c
+++ b/clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c
@@ -83,4 +83,12 @@ void spmd(void) {
   }
 }
 
+#pragma omp begin declare target device_type(nohost)
+__attribute__((weak)) 
+extern "C" int __kmpc_target_init(void *Ident, char Mode,
+                       bool UseGenericStateMachine, bool) { // all-remark {{Could not internalize function. Some optimizations may not be possible. [OMP140]}}
+  return 0;
+}
+#pragma omp end declare target
+
 // all-remark@* 9 {{OpenMP runtime call __kmpc_global_thread_num deduplicated. [OMP170]}}

diff  --git a/clang/test/OpenMP/remarks_parallel_in_target_state_machine.c b/clang/test/OpenMP/remarks_parallel_in_target_state_machine.c
index 755251acd2776..ee733147128c1 100644
--- a/clang/test/OpenMP/remarks_parallel_in_target_state_machine.c
+++ b/clang/test/OpenMP/remarks_parallel_in_target_state_machine.c
@@ -39,4 +39,12 @@ void spmd(void) {
   }
 }
 
+#pragma omp begin declare target device_type(nohost)
+__attribute__((weak)) 
+extern "C" int __kmpc_target_init(void *Ident, char Mode,
+                       bool UseGenericStateMachine, bool) { // expected-remark {{Could not internalize function. Some optimizations may not be possible. [OMP140]}}
+  return 0;
+}
+#pragma omp end declare target
+
 // expected-remark@* {{OpenMP runtime call __kmpc_global_thread_num deduplicated. [OMP170]}}


        


More information about the cfe-commits mailing list