1; RUN: llc < %s -mtriple=thumbv6m-eabi -verify-machineinstrs -o - | FileCheck %s
2target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-v128:64:128-a:0:32-n32-S64"
3target triple = "thumbv6m-none--eabi"
4
5@a = external global i32*
6@b = external global i32*
7
8; Function Attrs: nounwind
9define void @foo() #0 {
10entry:
11; CHECK-LABEL: foo:
12; CHECK: ldr r[[SB:[0-9]]], .LCPI
13; CHECK: ldr r[[LB:[0-9]]], .LCPI
14; CHECK: adds r[[NLB:[0-9]]], r[[LB]], #4
15; CHECK-NEXT: ldm r[[NLB]],
16; CHECK: adds r[[NSB:[0-9]]], r[[SB]], #4
17; CHECK-NEXT: stm r[[NSB]]
18  %0 = load i32*, i32** @a, align 4
19  %arrayidx = getelementptr inbounds i32, i32* %0, i32 1
20  %1 = bitcast i32* %arrayidx to i8*
21  %2 = load i32*, i32** @b, align 4
22  %arrayidx1 = getelementptr inbounds i32, i32* %2, i32 1
23  %3 = bitcast i32* %arrayidx1 to i8*
24  tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %3, i32 24, i32 4, i1 false)
25  ret void
26}
27
28; Function Attrs: nounwind
29declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) #1
30