1; RUN: opt -S -instcombine < %s 2>&1 | FileCheck %s
2
3define i64 @f(i64* %p1, i64* %p2) {
4top:
5  ; check that the tbaa is preserved
6  ; CHECK-LABEL: @f(
7  ; CHECK: %v1 = load i64, i64* %p1, align 8, !tbaa !0
8  ; CHECK: store i64 %v1, i64* %p2, align 8
9  ; CHECK: ret i64 %v1
10  %v1 = load i64, i64* %p1, align 8, !tbaa !0
11  store i64 %v1, i64* %p2, align 8
12  %v2 = load i64, i64* %p2, align 8
13  ret i64 %v2
14}
15
16!0 = !{!1, !1, i64 0}
17!1 = !{!"load_tbaa"}
18