brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 9954914 Raw
44 lines · plain
1; REQUIRES: x86_64-linux2; RUN: opt < %s -passes=pseudo-probe -function-sections -S -o - | FileCheck %s3 4;; Check the generation of pseudoprobe intrinsic call for non-EH blocks only.5 6declare i32 @__gxx_personality_v0(...)7declare i32 @llvm.eh.typeid.for(ptr) nounwind8declare ptr @__cxa_begin_catch(ptr)9declare void @__cxa_end_catch()10declare void @bar()11 12@_ZTIi = external constant ptr13 14define void @foo() uwtable ssp personality ptr @__gxx_personality_v0 {15entry:16; CHECK: call void @llvm.pseudoprobe17  invoke void @bar()18          to label %ret unwind label %lpad19 20ret:21; CHECK-NOT: call void @llvm.pseudoprobe22  ret void23 24lpad:                                             ; preds = %entry25; CHECK-NOT: call void @llvm.pseudoprobe26  %exn = landingpad {ptr, i32}27            catch ptr @_ZTIi28  %eh.exc = extractvalue { ptr, i32 } %exn, 029  %eh.selector = extractvalue { ptr, i32 } %exn, 130  %0 = call i32 @llvm.eh.typeid.for(ptr @_ZTIi) nounwind31  %1 = icmp eq i32 %eh.selector, %032  br i1 %1, label %catch, label %eh.resume33 34catch:35; CHECK-NOT: call void @llvm.pseudoprobe36  %ignored = call ptr @__cxa_begin_catch(ptr %eh.exc) nounwind37  call void @__cxa_end_catch() nounwind38  br label %ret39 40eh.resume:41; CHECK-NOT: call void @llvm.pseudoprobe42  resume { ptr, i32 } %exn43}44