1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instcombine -data-layout=p:32:32 -S | FileCheck %s
4 declare void @bcopy(ptr nocapture readonly, ptr nocapture, i32)
6 define void @bcopy_memmove(ptr nocapture readonly %a, ptr nocapture %b) {
7 ; CHECK-LABEL: @bcopy_memmove(
8 ; CHECK-NEXT: [[TMP1:%.*]] = load i64, ptr [[A:%.*]], align 1
9 ; CHECK-NEXT: store i64 [[TMP1]], ptr [[B:%.*]], align 1
10 ; CHECK-NEXT: ret void
12 tail call void @bcopy(ptr %a, ptr %b, i32 8)
16 define void @bcopy_memmove2(ptr nocapture readonly %a, ptr nocapture %b, i32 %len) {
17 ; CHECK-LABEL: @bcopy_memmove2(
18 ; CHECK-NEXT: tail call void @llvm.memmove.p0.p0.i32(ptr align 1 [[B:%.*]], ptr align 1 [[A:%.*]], i32 [[LEN:%.*]], i1 false)
19 ; CHECK-NEXT: ret void
21 tail call void @bcopy(ptr %a, ptr %b, i32 %len)