brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 266a7f8 Raw
52 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=inline < %s | FileCheck %s3 4; Check that the exception handling code is fully pruned, and does not5; leave behind invalid IR.6 7define internal void @foo(i1 %arg) personality ptr undef {8entry:9  br i1 false, label %join, label %split10 11split:12  br label %join13 14join:15  %phi = phi i64 [ 1, %split ], [ 0, %entry ]16  %cmp = icmp ugt i64 1, %phi17  br i1 %cmp, label %invoke1, label %exit18 19invoke1:20  invoke void undef()21  to label %exit unwind label %cleanup122 23cleanup1:24  %pad1 = cleanuppad within none []25  br label %cleanup1.cont26 27cleanup1.cont:28  br i1 %arg, label %cleanupret, label %invoke229 30invoke2:31  invoke void undef() [ "funclet"(token %pad1) ]32  to label %cleanup1.cont unwind label %cleanup233 34cleanup2:35  %pad2 = cleanuppad within %pad1 []36  unreachable37 38cleanupret:39  unreachable40 41exit:42  ret void43}44 45define void @test() personality ptr undef {46; CHECK-LABEL: @test(47; CHECK-NEXT:    ret void48;49  call void @foo(i1 1)50  ret void51}52