================
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fopenmp 
-fopenmp-is-target-device \
+// RUN:   -fclangir -emit-cir %s -o - \
+// RUN:   | FileCheck %s --check-prefix=CIR --implicit-check-not=One 
--implicit-check-not=Missing
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fopenmp 
-fopenmp-is-target-device \
+// RUN:   -fclangir -emit-llvm %s -o - \
+// RUN:   | FileCheck %s --check-prefix=LLVM --implicit-check-not=One 
--implicit-check-not=Missing
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fopenmp 
-fopenmp-is-target-device \
+// RUN:   -emit-llvm %s -o - \
+// RUN:   | FileCheck %s --check-prefix=OGCG --implicit-check-not=One 
--implicit-check-not=Missing
+
+// Aliasee without declare target: skipped on the device.
+int __One(void) { return 1; }
+int One(void) __attribute__((weak, alias("__One")));
+int One_(void) __attribute__((alias("__One")));
+
+// Declare target aliasee: emitted on the device.
+// CIR-DAG: cir.func weak hidden @Two() -> !s32i alias(@__Two)
+// CIR-DAG: cir.func hidden dso_local @Two_() -> !s32i alias(@__Two)
----------------
aobolensk wrote:

Yes, alias lowering drops visibility. Gonna fix it separately. The PR will be 
mentioned here

https://github.com/llvm/llvm-project/pull/234627
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to