1; RUN: opt < %s -prune-eh -S -enable-new-pm=0 | FileCheck %s 2; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s 3 4declare void @nounwind() nounwind 5 6define internal void @foo() { 7 call void @nounwind() 8 ret void 9} 10 11; CHECK-LABEL: @caller 12define i32 @caller(i32 %n) personality i32 (...)* @__gxx_personality_v0 { 13entry: 14 br label %for 15 16for: 17 %j = phi i32 [0, %entry], [%j.inc, %inc] 18 %j.cmp = icmp slt i32 %j, %n 19 br i1 %j.cmp, label %body, label %exit, !llvm.loop !0 20 21body: 22; CHECK: call void @foo(), !llvm.mem.parallel_loop_access !0 23 invoke void @foo( ) 24 to label %Normal unwind label %Except, !llvm.mem.parallel_loop_access !0 25 br label %inc 26 27inc: 28 %j.inc = add nuw nsw i32 %j, 1 29 br label %for, !llvm.loop !0 30 31exit: 32 br label %Normal 33 34Normal: 35 ret i32 0 36 37Except: 38 landingpad { i8*, i32 } 39 catch i8* null 40 ret i32 1 41} 42 43declare i32 @__gxx_personality_v0(...) 44 45!0 = distinct !{!0} 46