[clang] [CUDA][HIP] Exclude external variables from constant promotion. (PR #73549)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 28 05:35:15 PST 2023
================
@@ -104,3 +106,17 @@ void fun() {
(void) b<double>;
(void) var_host_only;
}
+
+// NEG-NOT: external_func
+extern __global__ void external_func();
+// NEG-NOT: @external_dep
+extern void* const external_dep[] = {
+ (void*)(external_func)
+};
+// NEG-NOT: @external_arr
----------------
arsenm wrote:
Not sure this negative check really works as expected; won't any global variable be printed at the top of the file before any functions?
https://github.com/llvm/llvm-project/pull/73549
More information about the cfe-commits
mailing list