brintos

brintos / llvm-project-archived public Read only

0
0
Text · 871 B · 16ed318 Raw
24 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=instcombine -data-layout=p:32:32 -S | FileCheck %s3 4declare void @bcopy(ptr nocapture readonly, ptr nocapture, i32)5 6define void @bcopy_memmove(ptr nocapture readonly %a, ptr nocapture %b) {7; CHECK-LABEL: @bcopy_memmove(8; CHECK-NEXT:    [[TMP1:%.*]] = load i64, ptr [[A:%.*]], align 19; CHECK-NEXT:    store i64 [[TMP1]], ptr [[B:%.*]], align 110; CHECK-NEXT:    ret void11;12  tail call void @bcopy(ptr %a, ptr %b, i32 8)13  ret void14}15 16define 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 void20;21  tail call void @bcopy(ptr %a, ptr %b, i32 %len)22  ret void23}24