1 ; RUN: opt -passes='print<memoryssa-walker>' -disable-output < %s 2>&1 | FileCheck %s
3 ; CHECK: define void @test
4 ; CHECK: 1 = MemoryDef(liveOnEntry)->liveOnEntry - clobbered by liveOnEntry
5 ; CHECK: store i8 42, i8* %a1
6 ; CHECK: 2 = MemoryDef(1)->liveOnEntry - clobbered by liveOnEntry
7 ; CHECK: store i8 42, i8* %a2
8 ; CHECK: MemoryUse(1) MustAlias - clobbered by 1 = MemoryDef(liveOnEntry)->liveOnEntry
9 ; CHECK: %l1 = load i8, i8* %a1
10 ; CHECK: MemoryUse(2) MustAlias - clobbered by 2 = MemoryDef(1)->liveOnEntry
11 ; CHECK: %l2 = load i8, i8* %a2
12 ; CHECK: 3 = MemoryDef(2)->liveOnEntry - clobbered by liveOnEntry
13 ; CHECK: store i8 42, i8* %p
14 ; CHECK: 4 = MemoryDef(3)->3 MustAlias - clobbered by 3 = MemoryDef(2)->liveOnEntry
15 ; CHECK: store i8 42, i8* %p
16 ; CHECK: MemoryUse(4) MustAlias - clobbered by 4 = MemoryDef(3)->3 MustAlias
17 ; CHECK: %p1 = load i8, i8* %p
18 ; CHECK: MemoryUse(4) MustAlias - clobbered by 4 = MemoryDef(3)->3 MustAlias
19 ; CHECK: %p2 = load i8, i8* %p
21 define void @test(i8* %p) {
26 %l1 = load i8, i8* %a1
27 %l2 = load i8, i8* %a2