1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -memcpyopt -S -verify-memoryssa | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 define void @test(i64 %size) {
7 ; CHECK-NEXT: [[SRC:%.*]] = alloca i8, i64 [[SIZE:%.*]], align 1
8 ; CHECK-NEXT: [[DST:%.*]] = alloca i8, i64 [[SIZE]], align 1
11 %src = alloca i8, i64 %size
12 %dst = alloca i8, i64 %size
13 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %dst, i8* align 8 %src, i64 %size, i1 false)
18 define void @test2(i64 %size1, i64 %size2, i64 %cpy_size) {
19 ; CHECK-LABEL: @test2(
20 ; CHECK-NEXT: [[SRC:%.*]] = alloca i8, i64 [[SIZE1:%.*]], align 1
21 ; CHECK-NEXT: [[DST:%.*]] = alloca i8, i64 [[SIZE2:%.*]], align 1
22 ; CHECK-NEXT: ret void
24 %src = alloca i8, i64 %size1
25 %dst = alloca i8, i64 %size2
26 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %dst, i8* align 8 %src, i64 %cpy_size, i1 false)
31 declare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i1)