; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes --check-globals --include-generated-funcs
; RUN: opt -aa-pipeline=basic-aa -passes=openmp-opt -S < %s | FileCheck %s --check-prefixes=CHECK
define void @f() {
%1 = alloca i64
%2 = call double @g(ptr %1)
ret void
}
define internal double @g(ptr %0) {
%2 = call ptr @h(ptr %0)
ret double 0.000000e+00
}
define weak_odr ptr @h(ptr %0) {
%2 = load i64, ptr %0
%3 = getelementptr double, ptr %0, i64 %2
ret ptr %3
}
!llvm.module.flags = !{!0, !1}
!0 = !{i32 7, !"openmp", i32 50}
!1 = !{i32 7, !"openmp-device", i32 50}
; CHECK: Function Attrs: norecurse nounwind memory(none)
; CHECK-LABEL: define {{[^@]+}}@f
; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
; CHECK-NEXT: ret void
;
;
; CHECK-LABEL: define {{[^@]+}}@h
; CHECK-SAME: (ptr [[TMP0:%.*]]) {
; CHECK-NEXT: [[TMP2:%.*]] = load i64, ptr [[TMP0]], align 4
; CHECK-NEXT: [[TMP3:%.*]] = getelementptr double, ptr [[TMP0]], i64 [[TMP2]]
; CHECK-NEXT: ret ptr [[TMP3]]
;
;.
; CHECK: attributes #[[ATTR0]] = { norecurse nounwind memory(none) }
;.
; CHECK: [[META0:![0-9]+]] = !{i32 7, !"openmp", i32 50}
; CHECK: [[META1:![0-9]+]] = !{i32 7, !"openmp-device", i32 50}
;.