1 ; RUN: opt -aa-pipeline=basic-aa -passes=gvn -S < %s | FileCheck %s
2 ; REQUIRES: arm-registered-target
4 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
6 ; BasicAA should prove that these calls don't interfere, since we've
7 ; specifically special cased exactly these two intrinsics in
8 ; MemoryLocation::getForArgument.
10 ; CHECK: define <8 x i16> @test1(ptr %p, <8 x i16> %y) {
12 ; CHECK-NEXT: %q = getelementptr i8, ptr %p, i64 16
13 ; CHECK-NEXT: %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) [[ATTR:#[0-9]+]]
14 ; CHECK-NEXT: call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16)
15 ; CHECK-NEXT: %c = add <8 x i16> %a, %a
16 define <8 x i16> @test1(ptr %p, <8 x i16> %y) {
18 %q = getelementptr i8, ptr %p, i64 16
19 %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) nounwind
20 call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16)
21 %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) nounwind
22 %c = add <8 x i16> %a, %b
26 declare <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr, i32) nounwind readonly
27 declare void @llvm.arm.neon.vst1.p0.v8i16(ptr, <8 x i16>, i32) nounwind
29 ; CHECK: attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
30 ; CHECK: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
31 ; CHECK: attributes [[ATTR]] = { nounwind }