1; RUN: opt < %s -passes='function(instcombine),cgscc(inline),function-attrs,function(loop-mssa(licm),simple-loop-unswitch,gvn,verify)' 2; PR12573 3target 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-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" 4target triple = "x86_64-apple-macosx10.7.0" 5 6%class.D.22.42.66.102.138.158.178.198.238.242.246.250.262.294.302.338.346.379 = type { ptr, %class.B.21.41.65.101.137.157.177.197.237.241.245.249.261.293.301.337.345.378 } 7%class.C.23.43.67.103.139.159.179.199.239.243.247.251.263.295.303.339.347.376 = type { ptr } 8%class.B.21.41.65.101.137.157.177.197.237.241.245.249.261.293.301.337.345.378 = type { ptr } 9%class.A.20.40.64.100.136.156.176.196.236.240.244.248.260.292.300.336.344.377 = type { i8 } 10 11define void @_Z23get_reconstruction_pathv(i1 %arg) uwtable ssp personality ptr @__gxx_personality_v0 { 12entry: 13 %c = alloca %class.D.22.42.66.102.138.158.178.198.238.242.246.250.262.294.302.338.346.379, align 8 14 br label %for.cond 15 16for.cond: ; preds = %for.end, %entry 17 invoke void @_ZN1DptEv(ptr %c) 18 to label %invoke.cont unwind label %lpad 19 20invoke.cont: ; preds = %for.cond 21 invoke void @_ZN1C3endEv() 22 to label %for.cond3 unwind label %lpad 23 24for.cond3: ; preds = %invoke.cont6, %invoke.cont 25 invoke void @_ZN1DptEv(ptr %c) 26 to label %invoke.cont4 unwind label %lpad 27 28invoke.cont4: ; preds = %for.cond3 29 invoke void @_ZN1C3endEv() 30 to label %invoke.cont6 unwind label %lpad 31 32invoke.cont6: ; preds = %invoke.cont4 33 br i1 %arg, label %for.cond3, label %for.end 34 35lpad: ; preds = %for.end, %invoke.cont4, %for.cond3, %invoke.cont, %for.cond 36 %0 = landingpad { ptr, i32 } 37 cleanup 38 resume { ptr, i32 } undef 39 40for.end: ; preds = %invoke.cont6 41 invoke void @_ZN1C13_M_insert_auxER1D() 42 to label %for.cond unwind label %lpad 43} 44 45define void @_ZN1DptEv(ptr %this) uwtable ssp align 2 { 46entry: 47 %this.addr = alloca ptr, align 8 48 store ptr %this, ptr %this.addr, align 8 49 %this1 = load ptr, ptr %this.addr 50 %0 = load ptr, ptr %this1, align 8 51 %tobool = icmp ne ptr %0, null 52 br i1 %tobool, label %cond.end, label %cond.false 53 54cond.false: ; preds = %entry 55 call void @_Z10__assert13v() noreturn 56 unreachable 57 58cond.end: ; preds = %entry 59 ret void 60} 61 62declare i32 @__gxx_personality_v0(...) 63 64declare void @_ZN1C3endEv() 65 66define void @_ZN1C13_M_insert_auxER1D() uwtable ssp align 2 { 67entry: 68 ret void 69} 70 71define void @_ZN1DD1Ev() unnamed_addr uwtable inlinehint ssp align 2 { 72entry: 73 ret void 74} 75 76define void @_ZN1DD2Ev() unnamed_addr uwtable inlinehint ssp align 2 { 77entry: 78 ret void 79} 80 81define void @_ZN1BD1Ev() unnamed_addr uwtable ssp align 2 { 82entry: 83 ret void 84} 85 86define void @_ZN1BD2Ev() unnamed_addr uwtable ssp align 2 { 87entry: 88 ret void 89} 90 91define void @_ZN1BaSERS_() uwtable ssp align 2 { 92entry: 93 unreachable 94} 95 96declare void @_Z10__assert13v() noreturn 97