From: Alina Sbirlea Date: Wed, 5 Aug 2020 23:12:09 +0000 (-0700) Subject: [MSSA] Update test with more detailed and resilient checks. [NFC] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=beb9993d960bebc14f25538fa4b596f2d8ca75ac;p=platform%2Fupstream%2Fllvm.git [MSSA] Update test with more detailed and resilient checks. [NFC] --- diff --git a/llvm/test/Analysis/MemorySSA/pr43427.ll b/llvm/test/Analysis/MemorySSA/pr43427.ll index cb8afbb..3cb5715 100644 --- a/llvm/test/Analysis/MemorySSA/pr43427.ll +++ b/llvm/test/Analysis/MemorySSA/pr43427.ll @@ -1,10 +1,38 @@ -; RUN: opt -disable-output -loop-simplify -licm -enable-new-pm=0 -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s +; RUN: opt -disable-output -licm -enable-new-pm=0 -print-memoryssa -enable-mssa-loop-dependency=true < %s 2>&1 | FileCheck %s ; RUN: opt -disable-output -aa-pipeline=basic-aa -passes='loop-mssa(licm),print' < %s 2>&1 | FileCheck %s ; CHECK-LABEL: @f() -; CHECK: 7 = MemoryPhi( -; CHECK: 6 = MemoryPhi( -; CHECK: 8 = MemoryPhi( + +; CHECK: lbl1: +; CHECK-NEXT: ; [[NO4:.*]] = MemoryPhi({entry,liveOnEntry},{lbl1.backedge,[[NO9:.*]]}) +; CHECK-NEXT: ; [[NO2:.*]] = MemoryDef([[NO4]]) +; CHECK-NEXT: call void @g() +; CHECK-NEXT: br i1 undef, label %for.end, label %if.else + +; CHECK: for.end: +; CHECK-NEXT: br i1 undef, label %lbl3, label %lbl2 + +; CHECK: lbl2: +; CHECK-NEXT: ; [[NO8:.*]] = MemoryPhi({lbl3,[[NO7:.*]]},{for.end,[[NO2]]}) +; CHECK-NEXT: br label %lbl3 + +; CHECK: lbl3: +; CHECK-NEXT: [[NO7]] = MemoryPhi({lbl2,[[NO8]]},{for.end,2}) + +; CHECK: cleanup: +; CHECK-NEXT: MemoryUse([[NO7]]) MayAlias +; CHECK-NEXT: %cleanup.dest = load i32, i32* undef, align 1 + +; CHECK: lbl1.backedge: +; CHECK-NEXT: [[NO9]] = MemoryPhi({cleanup,[[NO7]]},{if.else,2}) +; CHECK-NEXT: br label %lbl1 + +; CHECK: cleanup.cont: +; CHECK-NEXT: ; [[NO6:.*]] = MemoryDef([[NO7]]) +; CHECK-NEXT: store i16 undef, i16* %e, align 1 +; CHECK-NEXT: 3 = MemoryDef([[NO6]]) +; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 1, i8* null) + define void @f() { entry: %e = alloca i16, align 1