brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 7393091 Raw
89 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=aarch64 -run-pass=aarch64-prelegalizer-combiner -O0 -verify-machineinstrs %s -o - | FileCheck %s3--- |4  target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"5  target triple = "arm64-apple-darwin"6 7  declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #18 9  define void @test_small_memcpy(ptr nocapture %dst, ptr nocapture readonly %src) {10  entry:11    %0 = bitcast ptr %dst to ptr12    %1 = bitcast ptr %src to ptr13    tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 %1, i64 32, i1 false)14    ret void15  }16 17  define void @test_large_memcpy(ptr nocapture %dst, ptr nocapture readonly %src) {18  entry:19    %0 = bitcast ptr %dst to ptr20    %1 = bitcast ptr %src to ptr21    tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 %1, i64 36, i1 false)22    ret void23  }24 25  attributes #1 = { argmemonly nounwind }26 27...28---29name:            test_small_memcpy30alignment:       431tracksRegLiveness: true32registers:33  - { id: 0, class: _ }34  - { id: 1, class: _ }35  - { id: 2, class: _ }36machineFunctionInfo: {}37body:             |38  bb.1.entry:39    liveins: $x0, $x140 41    ; CHECK-LABEL: name: test_small_memcpy42    ; CHECK: liveins: $x0, $x143    ; CHECK-NEXT: {{  $}}44    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x045    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x146    ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s128) = G_LOAD [[COPY1]](p0) :: (load (s128) from %ir.1, align 4)47    ; CHECK-NEXT: G_STORE [[LOAD]](s128), [[COPY]](p0) :: (store (s128) into %ir.0, align 4)48    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1649    ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = nuw inbounds G_PTR_ADD [[COPY1]], [[C]](s64)50    ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s128) = G_LOAD [[PTR_ADD]](p0) :: (load (s128) from %ir.1 + 16, align 4)51    ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p0) = nuw inbounds G_PTR_ADD [[COPY]], [[C]](s64)52    ; CHECK-NEXT: G_STORE [[LOAD1]](s128), [[PTR_ADD1]](p0) :: (store (s128) into %ir.0 + 16, align 4)53    ; CHECK-NEXT: RET_ReallyLR54    %0:_(p0) = COPY $x055    %1:_(p0) = COPY $x156    %2:_(s64) = G_CONSTANT i64 3257    G_MEMCPY %0(p0), %1(p0), %2(s64), 1 :: (store (s8) into %ir.0, align 4), (load (s8) from %ir.1, align 4)58    RET_ReallyLR59 60...61---62name:            test_large_memcpy63alignment:       464tracksRegLiveness: true65registers:66  - { id: 0, class: _ }67  - { id: 1, class: _ }68  - { id: 2, class: _ }69machineFunctionInfo: {}70body:             |71  bb.1.entry:72    liveins: $x0, $x173 74    ; CHECK-LABEL: name: test_large_memcpy75    ; CHECK: liveins: $x0, $x176    ; CHECK-NEXT: {{  $}}77    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x078    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x179    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 3680    ; CHECK-NEXT: G_MEMCPY [[COPY]](p0), [[COPY1]](p0), [[C]](s64), 1 :: (store (s8) into %ir.0, align 4), (load (s8) from %ir.1, align 4)81    ; CHECK-NEXT: RET_ReallyLR82    %0:_(p0) = COPY $x083    %1:_(p0) = COPY $x184    %2:_(s64) = G_CONSTANT i64 3685    G_MEMCPY %0(p0), %1(p0), %2(s64), 1 :: (store (s8) into %ir.0, align 4), (load (s8) from %ir.1, align 4)86    RET_ReallyLR87 88...89