| Tim Northover | 00ed996 | 2014-03-29 10:18:08 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=arm64 | FileCheck %s |
| 2 | ; rdar://r11231896 |
| 3 | |
| 4 | define void @t1(i8* nocapture %a, i8* nocapture %b) nounwind { |
| 5 | entry: |
| 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* %tmp1, align 1 |
| 13 | store i64 %tmp3, i64* %tmp2, align 1 |
| 14 | ret void |
| 15 | } |
| 16 | |
| 17 | define void @t2(i8* nocapture %a, i8* nocapture %b) nounwind { |
| 18 | entry: |
| 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* %tmp1, align 1 |
| 26 | store i32 %tmp3, i32* %tmp2, align 1 |
| 27 | ret void |
| 28 | } |
| 29 | |
| 30 | define void @t3(i8* nocapture %a, i8* nocapture %b) nounwind { |
| 31 | entry: |
| 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* %tmp1, align 1 |
| 39 | store i16 %tmp3, i16* %tmp2, align 1 |
| 40 | ret void |
| 41 | } |