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, ptr %a1
6 ; CHECK: 2 = MemoryDef(1)->liveOnEntry - clobbered by liveOnEntry
7 ; CHECK: store i8 42, ptr %a2
8 ; CHECK: MemoryUse(1) - clobbered by 1 = MemoryDef(liveOnEntry)->liveOnEntry
9 ; CHECK: %l1 = load i8, ptr %a1
10 ; CHECK: MemoryUse(2) - clobbered by 2 = MemoryDef(1)->liveOnEntry
11 ; CHECK: %l2 = load i8, ptr %a2
12 ; CHECK: 3 = MemoryDef(2)->liveOnEntry - clobbered by liveOnEntry
13 ; CHECK: store i8 42, ptr %p
14 ; CHECK: 4 = MemoryDef(3)->3 - clobbered by 3 = MemoryDef(2)->liveOnEntry
15 ; CHECK: store i8 42, ptr %p
16 ; CHECK: MemoryUse(4) - clobbered by 4 = MemoryDef(3)->3
17 ; CHECK: %p1 = load i8, ptr %p
18 ; CHECK: MemoryUse(4) - clobbered by 4 = MemoryDef(3)->3
19 ; CHECK: %p2 = load i8, ptr %p
21 define void @test(ptr %p) {
26 %l1 = load i8, ptr %a1
27 %l2 = load i8, ptr %a2