Revert "Change memcpy/memset/memmove to have dest and source alignments."
[oota-llvm.git] / test / CodeGen / AArch64 / fast-isel-memcpy.ll
1 ; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -fast-isel-abort=1 -verify-machineinstrs < %s | FileCheck %s
2
3 ; Test that we don't segfault.
4 ; CHECK-LABEL: test
5 ; CHECK:       ldr [[REG1:x[0-9]+]], [x1]
6 ; CHECK-NEXT:  and [[REG2:x[0-9]+]], x0, #0x7fffffffffffffff
7 ; CHECK-NEXT:  str [[REG1]], {{\[}}[[REG2]]{{\]}}
8 define void @test(i64 %a, i8* %b) {
9   %1 = and i64 %a, 9223372036854775807
10   %2 = inttoptr i64 %1 to i8*
11   call void @llvm.memcpy.p0i8.p0i8.i64(i8* %2, i8* %b, i64 8, i32 8, i1 false)
12   ret void
13 }
14
15 declare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i32, i1)