32 lines · plain
1; RUN: opt -passes=licm -verify-memoryssa %s -S | FileCheck %s2; REQUIRES: asserts3; Ensure verification doesn't fail with unreachable blocks.4 5target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"6target triple = "x86_64-grtev4-linux-gnu"7 8declare dso_local void @f()9 10; CHECK-LABEL: @foo11define dso_local void @foo(i1 %arg) {12entry:13 br i1 %arg, label %if.then, label %if.end14 15if.then: ; preds = %entry16 br label %try.cont17 18if.end: ; preds = %entry19; 1 = MemoryDef(liveOnEntry)20 call void @f()21 br label %try.cont22 23catch: ; No predecessors!24; 2 = MemoryDef(liveOnEntry)25 call void @f()26 br label %try.cont27 28try.cont: ; preds = %if.end, %catch, %if.then29; 3 = MemoryPhi({if.then,liveOnEntry},{if.end,1},{catch,liveOnEntry})30 ret void31}32