sstefan1 | b8235d2 | 2020-07-11 01:06:46 +0200 | [diff] [blame^] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature |
| 2 | ; RUN: opt -S -openmpopt < %s | FileCheck %s |
| 3 | ; RUN: opt -S -passes=openmpopt < %s | FileCheck %s |
| 4 | %struct.ident_t = type { i32, i32, i32, i32, i8* } |
| 5 | |
| 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 |
| 8 | |
| 9 | ; Function Attrs: nounwind uwtable |
| 10 | define dso_local i32 @b() #0 { |
| 11 | ; CHECK-LABEL: define {{[^@]+}}@b() #0 |
| 12 | ; CHECK-NEXT: [[TMP1:%.*]] = alloca i32, align 4 |
| 13 | ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @a() |
| 14 | ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP1]], align 4 |
| 15 | ; CHECK-NEXT: ret i32 [[TMP3]] |
| 16 | ; |
| 17 | %1 = alloca i32, align 4 |
| 18 | %2 = call i32 @a() |
| 19 | %3 = load i32, i32* %1, align 4 |
| 20 | ret i32 %3 |
| 21 | } |
| 22 | |
| 23 | ; Function Attrs: nounwind uwtable |
| 24 | define internal i32 @a() #0 { |
| 25 | ; CHECK-LABEL: define {{[^@]+}}@a() #0 |
| 26 | ; CHECK-NEXT: [[TMP1:%.*]] = alloca i32, align 4 |
| 27 | ; CHECK-NEXT: [[TMP2:%.*]] = call i32 @b() |
| 28 | ; CHECK-NEXT: 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*, ...)*)) |
| 29 | ; CHECK-NEXT: [[TMP3:%.*]] = load i32, i32* [[TMP1]], align 4 |
| 30 | ; CHECK-NEXT: ret i32 [[TMP3]] |
| 31 | ; |
| 32 | %1 = alloca i32, align 4 |
| 33 | %2 = call i32 @b() |
| 34 | 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*, ...)*)) |
| 35 | %3 = load i32, i32* %1, align 4 |
| 36 | ret i32 %3 |
| 37 | } |
| 38 | |
| 39 | ; Function Attrs: norecurse nounwind uwtable |
| 40 | define internal void @.omp_outlined.(i32* noalias %0, i32* noalias %1) #1 { |
| 41 | ; CHECK-LABEL: define {{[^@]+}}@.omp_outlined. |
| 42 | ; CHECK-SAME: (i32* noalias [[TMP0:%.*]], i32* noalias [[TMP1:%.*]]) #1 |
| 43 | ; CHECK-NEXT: [[TMP3:%.*]] = alloca i32*, align 8 |
| 44 | ; CHECK-NEXT: [[TMP4:%.*]] = alloca i32*, align 8 |
| 45 | ; CHECK-NEXT: store i32* [[TMP0]], i32** [[TMP3]], align 8, !tbaa !2 |
| 46 | ; CHECK-NEXT: store i32* [[TMP1]], i32** [[TMP4]], align 8, !tbaa !2 |
| 47 | ; CHECK-NEXT: ret void |
| 48 | ; |
| 49 | %3 = alloca i32*, align 8 |
| 50 | %4 = alloca i32*, align 8 |
| 51 | store i32* %0, i32** %3, align 8, !tbaa !2 |
| 52 | store i32* %1, i32** %4, align 8, !tbaa !2 |
| 53 | ret void |
| 54 | } |
| 55 | |
| 56 | ; Function Attrs: nounwind |
| 57 | declare !callback !6 void @__kmpc_fork_call(%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) #2 |
| 58 | |
| 59 | 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" } |
| 60 | 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" } |
| 61 | attributes #2 = { nounwind } |
| 62 | |
| 63 | !llvm.module.flags = !{!0} |
| 64 | !llvm.ident = !{!1} |
| 65 | |
| 66 | !0 = !{i32 1, !"wchar_size", i32 4} |
| 67 | !1 = !{!"Debian clang version 11.0.0-++20200709100646+c92a8c0a0f6-1~exp1~20200709201313.3348"} |
| 68 | !2 = !{!3, !3, i64 0} |
| 69 | !3 = !{!"any pointer", !4, i64 0} |
| 70 | !4 = !{!"omnipotent char", !5, i64 0} |
| 71 | !5 = !{!"Simple C/C++ TBAA"} |
| 72 | !6 = !{!7} |
| 73 | !7 = !{i64 2, i64 -1, i64 -1, i1 true} |