• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
2; Check that memcpy gets lowered to ldm/stm, at least in this very smple case.
3
4%struct.Foo = type { i32, i32, i32, i32 }
5
6define void @_Z10CopyStructP3FooS0_(%struct.Foo* nocapture %a, %struct.Foo* nocapture %b) nounwind {
7entry:
8;CHECK: ldm
9;CHECK: stm
10  %0 = bitcast %struct.Foo* %a to i8*
11  %1 = bitcast %struct.Foo* %b to i8*
12  tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %0, i8* %1, i32 16, i32 4, i1 false)
13  ret void
14}
15
16declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
17