1; RUN: opt < %s -basicaa -globalsmodref-aa -gvn -S | FileCheck %s
2
3declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
4define void @foo(i8* %x, i8* %y) {
5  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %x, i8* %y, i32 1, i32 1, i1 false);
6  ret void
7}
8
9define void @bar(i8* %y, i8* %z) {
10  %x = alloca i8
11  call void @foo(i8* %x, i8* %y)
12  %t = load i8, i8* %x
13  store i8 %t, i8* %y
14; CHECK: store i8 %t, i8* %y
15  ret void
16}
17
18
19define i32 @foo2() {
20  %foo = alloca i32
21  call void @bar2(i32* %foo)
22  %t0 = load i32, i32* %foo, align 4
23; CHECK: %t0 = load i32, i32* %foo, align 4
24  ret i32 %t0
25}
26
27define void @bar2(i32* %foo)  {
28  store i32 0, i32* %foo, align 4
29  tail call void @llvm.dbg.value(metadata !{}, i64 0, metadata !{}, metadata !{})
30  ret void
31}
32
33declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
34