20 lines · plain
1; RUN: opt < %s -passes=adce -S | grep null2 3declare i32 @strlen(ptr) readnone4 5define i32 @test() personality ptr @__gxx_personality_v0 {6 ; invoke of pure function should not be deleted!7 invoke i32 @strlen( ptr null ) readnone8 to label %Cont unwind label %Other ; <i32>:1 [#uses=0]9 10Cont: ; preds = %011 ret i32 012 13Other: ; preds = %014 %exn = landingpad {ptr, i32}15 cleanup16 ret i32 117}18 19declare i32 @__gxx_personality_v0(...)20