27 lines · plain
1; RUN: opt -passes='print<memoryssa>' -disable-output %s 2>&1 | FileCheck %s2 3; Note: if @foo is modelled as a MemoryDef, this test will assert with -loop-rotate, due to MemorySSA not4; being preserved when moving instructions that may not read from or write to memory.5 6; CHECK-LABEL: @main7; CHECK-NOT: MemoryDef8define void @main(i1 %arg) {9entry:10 br label %for.cond12011 12for.cond120: ; preds = %for.body127, %entry13 call void @foo(i1 %arg)14 br i1 %arg, label %for.body127, label %for.cond.cleanup12615 16for.cond.cleanup126: ; preds = %for.cond12017 unreachable18 19for.body127: ; preds = %for.cond12020 %0 = load ptr, ptr undef, align 121 br label %for.cond12022}23 24declare void @foo() readnone25 26 27