1; RUN: opt < %s -S -basicaa -memcpyopt | FileCheck %s 2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 3 4%T = type { i64, i64 } 5 6define void @test(i8* %src) { 7 %tmp = alloca i8 8 %dst = alloca i8 9; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %dst, i8* %src, i64 1, i32 8, i1 false) 10 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp, i8* %src, i64 1, i32 8, i1 false), !noalias !2 11 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %dst, i8* %tmp, i64 1, i32 8, i1 false) 12 13 ret void 14} 15 16declare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i32, i1) 17 18; Check that the noalias for "dst" was removed by checking that the metadata is gone 19; CHECK-NOT: "dst" 20!0 = !{!0} 21!1 = distinct !{!1, !0, !"dst"} 22!2 = distinct !{!1} 23