1; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s
2; rdar://r11231896
3
4define void @t1(i8* nocapture %a, i8* nocapture %b) nounwind {
5entry:
6; CHECK-LABEL: t1:
7; CHECK-NOT: orr
8; CHECK: ldr [[X0:x[0-9]+]], [x1]
9; CHECK: str [[X0]], [x0]
10  %tmp1 = bitcast i8* %b to i64*
11  %tmp2 = bitcast i8* %a to i64*
12  %tmp3 = load i64, i64* %tmp1, align 1
13  store i64 %tmp3, i64* %tmp2, align 1
14  ret void
15}
16
17define void @t2(i8* nocapture %a, i8* nocapture %b) nounwind {
18entry:
19; CHECK-LABEL: t2:
20; CHECK-NOT: orr
21; CHECK: ldr [[W0:w[0-9]+]], [x1]
22; CHECK: str [[W0]], [x0]
23  %tmp1 = bitcast i8* %b to i32*
24  %tmp2 = bitcast i8* %a to i32*
25  %tmp3 = load i32, i32* %tmp1, align 1
26  store i32 %tmp3, i32* %tmp2, align 1
27  ret void
28}
29
30define void @t3(i8* nocapture %a, i8* nocapture %b) nounwind {
31entry:
32; CHECK-LABEL: t3:
33; CHECK-NOT: orr
34; CHECK: ldrh [[W0:w[0-9]+]], [x1]
35; CHECK: strh [[W0]], [x0]
36  %tmp1 = bitcast i8* %b to i16*
37  %tmp2 = bitcast i8* %a to i16*
38  %tmp3 = load i16, i16* %tmp1, align 1
39  store i16 %tmp3, i16* %tmp2, align 1
40  ret void
41}
42