1 ; RUN: opt < %s -S -basicaa -memcpyopt | FileCheck %s
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 define void @test(i8* %src) {
9 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %dst, i8* align 8 %src, i64 1, i1 false)
10 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %tmp, i8* align 8 %src, i64 1, i1 false), !noalias !2
11 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %dst, i8* align 8 %tmp, i64 1, i1 false)
16 declare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i1)
18 ; Check that the noalias for "dst" was removed by checking that the metadata is gone
21 !1 = distinct !{!1, !0, !"dst"}