[llvm] 91f06dd - [OpenMP][NFC] Include global alias test

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 22:38:15 PST 2023


Author: Johannes Doerfert
Date: 2023-01-11T22:24:22-08:00
New Revision: 91f06dd7326ccc69c8ef5fb399d171a981fdf9be

URL: https://github.com/llvm/llvm-project/commit/91f06dd7326ccc69c8ef5fb399d171a981fdf9be
DIFF: https://github.com/llvm/llvm-project/commit/91f06dd7326ccc69c8ef5fb399d171a981fdf9be.diff

LOG: [OpenMP][NFC] Include global alias test

Added: 
    llvm/test/Transforms/OpenMP/global_alias.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/OpenMP/global_alias.ll b/llvm/test/Transforms/OpenMP/global_alias.ll
new file mode 100644
index 0000000000000..e4dec6fab44cd
--- /dev/null
+++ b/llvm/test/Transforms/OpenMP/global_alias.ll
@@ -0,0 +1,26 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes
+; RUN: opt -S -passes=openmp-opt < %s | FileCheck %s
+
+ at alias = internal unnamed_addr alias void (ptr), ptr @callee
+
+define internal void @callee(ptr) {
+; CHECK-LABEL: define {{[^@]+}}@callee
+; CHECK-SAME: (ptr [[TMP0:%.*]]) {
+; CHECK-NEXT:    ret void
+;
+  ret void
+}
+
+define void @caller(ptr %p) {
+; CHECK-LABEL: define {{[^@]+}}@caller
+; CHECK-SAME: (ptr [[P:%.*]]) {
+; CHECK-NEXT:    call void @alias(ptr [[P]])
+; CHECK-NEXT:    ret void
+;
+  call void @alias(ptr %p)
+  ret void
+}
+
+!llvm.module.flags = !{!0, !1}
+!0 = !{i32 7, !"openmp", i32 50}
+!1 = !{i32 7, !"openmp-device", i32 50}


        


More information about the llvm-commits mailing list