[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / llvm / test / Transforms / OpenMP / dead_use.ll
blob32ae3684dc3b7501023c5a42b8246d003d26cada
1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
2 ; RUN: opt -S -openmp-opt-cgscc < %s | FileCheck %s
3 ; RUN: opt -S -passes=openmp-opt-cgscc < %s | FileCheck %s
4 %struct.ident_t = type { i32, i32, i32, i32, i8* }
6 @.str = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1
7 @0 = private unnamed_addr global %struct.ident_t { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i32 0, i32 0) }, align 8
9 ; Function Attrs: nounwind uwtable
10 define dso_local i32 @b() #0 {
11 ; CHECK-LABEL: define {{[^@]+}}@b
12 ; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
13 ; CHECK-NEXT:    [[TMP1:%.*]] = alloca i32, align 4
14 ; CHECK-NEXT:    [[TMP2:%.*]] = call i32 @a()
15 ; CHECK-NEXT:    [[TMP3:%.*]] = load i32, i32* [[TMP1]], align 4
16 ; CHECK-NEXT:    ret i32 [[TMP3]]
18   %1 = alloca i32, align 4
19   %2 = call i32 @a()
20   %3 = load i32, i32* %1, align 4
21   ret i32 %3
24 ; Function Attrs: nounwind uwtable
25 define internal i32 @a() #0 {
26 ; CHECK-LABEL: define {{[^@]+}}@a
27 ; CHECK-SAME: () #[[ATTR0]] {
28 ; CHECK-NEXT:    [[TMP1:%.*]] = alloca i32, align 4
29 ; CHECK-NEXT:    [[TMP2:%.*]] = call i32 @b()
30 ; CHECK-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB0:[0-9]+]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
31 ; CHECK-NEXT:    [[TMP3:%.*]] = load i32, i32* [[TMP1]], align 4
32 ; CHECK-NEXT:    ret i32 [[TMP3]]
34   %1 = alloca i32, align 4
35   %2 = call i32 @b()
36   call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @0, i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*))
37   %3 = load i32, i32* %1, align 4
38   ret i32 %3
41 ; Function Attrs: norecurse nounwind uwtable
42 define internal void @.omp_outlined.(i32* noalias %0, i32* noalias %1) #1 {
43 ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined.
44 ; CHECK-SAME: (i32* noalias [[TMP0:%.*]], i32* noalias [[TMP1:%.*]]) #[[ATTR1:[0-9]+]] {
45 ; CHECK-NEXT:    [[TMP3:%.*]] = alloca i32*, align 8
46 ; CHECK-NEXT:    [[TMP4:%.*]] = alloca i32*, align 8
47 ; CHECK-NEXT:    store i32* [[TMP0]], i32** [[TMP3]], align 8, !tbaa [[TBAA2:![0-9]+]]
48 ; CHECK-NEXT:    store i32* [[TMP1]], i32** [[TMP4]], align 8, !tbaa [[TBAA2]]
49 ; CHECK-NEXT:    ret void
51   %3 = alloca i32*, align 8
52   %4 = alloca i32*, align 8
53   store i32* %0, i32** %3, align 8, !tbaa !2
54   store i32* %1, i32** %4, align 8, !tbaa !2
55   ret void
58 ; Function Attrs: nounwind
59 declare !callback !6 void @__kmpc_fork_call(%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) #2
61 attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
62 attributes #1 = { norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
63 attributes #2 = { nounwind }
65 !llvm.module.flags = !{!0}
66 !llvm.ident = !{!1}
68 !0 = !{i32 1, !"wchar_size", i32 4}
69 !1 = !{!"Debian clang version 11.0.0-++20200709100646+c92a8c0a0f6-1~exp1~20200709201313.3348"}
70 !2 = !{!3, !3, i64 0}
71 !3 = !{!"any pointer", !4, i64 0}
72 !4 = !{!"omnipotent char", !5, i64 0}
73 !5 = !{!"Simple C/C++ TBAA"}
74 !6 = !{!7}
75 !7 = !{i64 2, i64 -1, i64 -1, i1 true}