Hal Finkel | 77364b7 | 2013-09-15 02:19:49 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=powerpc64-bgq-linux -mcpu=a2 < %s |
| 2 | target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" |
| 3 | target triple = "powerpc64-bgq-linux" |
| 4 | |
| 5 | %"class.std::__1::__assoc_sub_state" = type { %"class.std::__1::__shared_count", %"class.std::__exception_ptr::exception_ptr", %"class.std::__1::mutex", %"class.std::__1::condition_variable", i32 } |
| 6 | %"class.std::__1::__shared_count" = type { i32 (...)**, i64 } |
| 7 | %"class.std::__exception_ptr::exception_ptr" = type { i8* } |
| 8 | %"class.std::__1::mutex" = type { %union.pthread_mutex_t } |
| 9 | %union.pthread_mutex_t = type { %"struct.<anonymous union>::__pthread_mutex_s" } |
| 10 | %"struct.<anonymous union>::__pthread_mutex_s" = type { i32, i32, i32, i32, i32, i32, %struct.__pthread_internal_list } |
| 11 | %struct.__pthread_internal_list = type { %struct.__pthread_internal_list*, %struct.__pthread_internal_list* } |
| 12 | %"class.std::__1::condition_variable" = type { %union.pthread_cond_t } |
| 13 | %union.pthread_cond_t = type { %struct.anon } |
| 14 | %struct.anon = type { i32, i32, i64, i64, i64, i8*, i32, i32 } |
| 15 | %"class.std::__1::unique_lock" = type { %"class.std::__1::mutex"*, i8 } |
| 16 | |
| 17 | declare i32 @__gxx_personality_v0(...) |
| 18 | |
| 19 | ; Function Attrs: optsize |
| 20 | define void @_ZNSt3__117__assoc_sub_state4copyEv(%"class.std::__1::__assoc_sub_state"* %this) #0 align 2 { |
| 21 | entry: |
| 22 | %__lk = alloca %"class.std::__1::unique_lock", align 8 |
| 23 | %ref.tmp = alloca %"class.std::__exception_ptr::exception_ptr", align 8 |
| 24 | %tmp = alloca { i64, i64 }, align 8 |
| 25 | %agg.tmp = alloca %"class.std::__exception_ptr::exception_ptr", align 8 |
| 26 | %__mut_ = getelementptr inbounds %"class.std::__1::__assoc_sub_state"* %this, i64 0, i32 2 |
| 27 | %__m_.i.i = getelementptr inbounds %"class.std::__1::unique_lock"* %__lk, i64 0, i32 0 |
| 28 | store %"class.std::__1::mutex"* %__mut_, %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !0 |
| 29 | %__owns_.i.i = getelementptr inbounds %"class.std::__1::unique_lock"* %__lk, i64 0, i32 1 |
| 30 | store i8 1, i8* %__owns_.i.i, align 8, !tbaa !3 |
| 31 | call void @_ZNSt3__15mutex4lockEv(%"class.std::__1::mutex"* %__mut_) #4 |
| 32 | invoke void @_ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE(%"class.std::__1::__assoc_sub_state"* %this, %"class.std::__1::unique_lock"* %__lk) #4 |
| 33 | to label %invoke.cont unwind label %lpad |
| 34 | |
| 35 | invoke.cont: ; preds = %entry |
| 36 | %__exception_ = getelementptr inbounds %"class.std::__1::__assoc_sub_state"* %this, i64 0, i32 1 |
| 37 | %0 = bitcast { i64, i64 }* %tmp to i8* |
| 38 | call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 16, i32 8, i1 false) |
| 39 | call void @_ZNSt15__exception_ptr13exception_ptrC1EMS0_FvvE(%"class.std::__exception_ptr::exception_ptr"* %ref.tmp, { i64, i64 }* byval %tmp) #5 |
| 40 | %call = call zeroext i1 @_ZNSt15__exception_ptrneERKNS_13exception_ptrES2_(%"class.std::__exception_ptr::exception_ptr"* %__exception_, %"class.std::__exception_ptr::exception_ptr"* %ref.tmp) #5 |
| 41 | call void @_ZNSt15__exception_ptr13exception_ptrD1Ev(%"class.std::__exception_ptr::exception_ptr"* %ref.tmp) #5 |
| 42 | br i1 %call, label %if.then, label %if.end |
| 43 | |
| 44 | if.then: ; preds = %invoke.cont |
| 45 | call void @_ZNSt15__exception_ptr13exception_ptrC1ERKS0_(%"class.std::__exception_ptr::exception_ptr"* %agg.tmp, %"class.std::__exception_ptr::exception_ptr"* %__exception_) #5 |
| 46 | invoke void @_ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE(%"class.std::__exception_ptr::exception_ptr"* %agg.tmp) #6 |
| 47 | to label %invoke.cont4 unwind label %lpad3 |
| 48 | |
| 49 | invoke.cont4: ; preds = %if.then |
| 50 | unreachable |
| 51 | |
| 52 | lpad: ; preds = %entry |
| 53 | %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) |
| 54 | cleanup |
| 55 | %2 = extractvalue { i8*, i32 } %1, 0 |
| 56 | %3 = extractvalue { i8*, i32 } %1, 1 |
| 57 | br label %ehcleanup |
| 58 | |
| 59 | lpad3: ; preds = %if.then |
| 60 | %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) |
| 61 | cleanup |
| 62 | %5 = extractvalue { i8*, i32 } %4, 0 |
| 63 | %6 = extractvalue { i8*, i32 } %4, 1 |
| 64 | call void @_ZNSt15__exception_ptr13exception_ptrD1Ev(%"class.std::__exception_ptr::exception_ptr"* %agg.tmp) #5 |
| 65 | br label %ehcleanup |
| 66 | |
| 67 | if.end: ; preds = %invoke.cont |
| 68 | %7 = load i8* %__owns_.i.i, align 8, !tbaa !3, !range !4 |
| 69 | %tobool.i.i = icmp eq i8 %7, 0 |
| 70 | br i1 %tobool.i.i, label %_ZNSt3__111unique_lockINS_5mutexEED1Ev.exit, label %if.then.i.i |
| 71 | |
| 72 | if.then.i.i: ; preds = %if.end |
| 73 | %8 = load %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !0 |
| 74 | call void @_ZNSt3__15mutex6unlockEv(%"class.std::__1::mutex"* %8) #5 |
| 75 | br label %_ZNSt3__111unique_lockINS_5mutexEED1Ev.exit |
| 76 | |
| 77 | _ZNSt3__111unique_lockINS_5mutexEED1Ev.exit: ; preds = %if.then.i.i, %if.end |
| 78 | ret void |
| 79 | |
| 80 | ehcleanup: ; preds = %lpad3, %lpad |
| 81 | %exn.slot.0 = phi i8* [ %5, %lpad3 ], [ %2, %lpad ] |
| 82 | %ehselector.slot.0 = phi i32 [ %6, %lpad3 ], [ %3, %lpad ] |
| 83 | %9 = load i8* %__owns_.i.i, align 8, !tbaa !3, !range !4 |
| 84 | %tobool.i.i9 = icmp eq i8 %9, 0 |
| 85 | br i1 %tobool.i.i9, label %_ZNSt3__111unique_lockINS_5mutexEED1Ev.exit12, label %if.then.i.i11 |
| 86 | |
| 87 | if.then.i.i11: ; preds = %ehcleanup |
| 88 | %10 = load %"class.std::__1::mutex"** %__m_.i.i, align 8, !tbaa !0 |
| 89 | call void @_ZNSt3__15mutex6unlockEv(%"class.std::__1::mutex"* %10) #5 |
| 90 | br label %_ZNSt3__111unique_lockINS_5mutexEED1Ev.exit12 |
| 91 | |
| 92 | _ZNSt3__111unique_lockINS_5mutexEED1Ev.exit12: ; preds = %if.then.i.i11, %ehcleanup |
| 93 | %lpad.val = insertvalue { i8*, i32 } undef, i8* %exn.slot.0, 0 |
| 94 | %lpad.val5 = insertvalue { i8*, i32 } %lpad.val, i32 %ehselector.slot.0, 1 |
| 95 | resume { i8*, i32 } %lpad.val5 |
| 96 | } |
| 97 | |
| 98 | ; Function Attrs: optsize |
| 99 | declare void @_ZNSt3__117__assoc_sub_state10__sub_waitERNS_11unique_lockINS_5mutexEEE(%"class.std::__1::__assoc_sub_state"*, %"class.std::__1::unique_lock"*) #0 align 2 |
| 100 | |
| 101 | ; Function Attrs: nounwind optsize |
| 102 | declare zeroext i1 @_ZNSt15__exception_ptrneERKNS_13exception_ptrES2_(%"class.std::__exception_ptr::exception_ptr"*, %"class.std::__exception_ptr::exception_ptr"*) #1 |
| 103 | |
| 104 | ; Function Attrs: nounwind optsize |
| 105 | declare void @_ZNSt15__exception_ptr13exception_ptrC1EMS0_FvvE(%"class.std::__exception_ptr::exception_ptr"*, { i64, i64 }* byval) #1 |
| 106 | |
| 107 | ; Function Attrs: nounwind optsize |
| 108 | declare void @_ZNSt15__exception_ptr13exception_ptrD1Ev(%"class.std::__exception_ptr::exception_ptr"*) #1 |
| 109 | |
| 110 | ; Function Attrs: noreturn optsize |
| 111 | declare void @_ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE(%"class.std::__exception_ptr::exception_ptr"*) #2 |
| 112 | |
| 113 | ; Function Attrs: nounwind optsize |
| 114 | declare void @_ZNSt15__exception_ptr13exception_ptrC1ERKS0_(%"class.std::__exception_ptr::exception_ptr"*, %"class.std::__exception_ptr::exception_ptr"*) #1 |
| 115 | |
| 116 | ; Function Attrs: nounwind optsize |
| 117 | declare void @_ZNSt3__15mutex6unlockEv(%"class.std::__1::mutex"*) #1 |
| 118 | |
| 119 | ; Function Attrs: optsize |
| 120 | declare void @_ZNSt3__15mutex4lockEv(%"class.std::__1::mutex"*) #0 |
| 121 | |
| 122 | ; Function Attrs: nounwind |
| 123 | declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) #3 |
| 124 | |
| 125 | attributes #0 = { optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 126 | attributes #1 = { nounwind optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 127 | attributes #2 = { noreturn optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 128 | attributes #3 = { nounwind } |
| 129 | attributes #4 = { optsize } |
| 130 | attributes #5 = { nounwind optsize } |
| 131 | attributes #6 = { noreturn optsize } |
| 132 | |
| 133 | !0 = metadata !{metadata !"any pointer", metadata !1} |
| 134 | !1 = metadata !{metadata !"omnipotent char", metadata !2} |
| 135 | !2 = metadata !{metadata !"Simple C/C++ TBAA"} |
| 136 | !3 = metadata !{metadata !"bool", metadata !1} |
| 137 | !4 = metadata !{i8 0, i8 2} |