1 ; RUN: opt -basicaa -gvn -S < %s | FileCheck %s 2 ; REQUIRES: arm 3 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" 5 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. 9 10 ; CHECK: define <8 x i16> @test1(i8* %p, <8 x i16> %y) { 11 ; CHECK-NEXT: entry: 12 ; CHECK-NEXT: %q = getelementptr i8, i8* %p, i64 16 13 ; CHECK-NEXT: %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) [[ATTR:#[0-9]+]] 14 ; CHECK-NEXT: call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16) 15 ; CHECK-NEXT: %c = add <8 x i16> %a, %a 16 define <8 x i16> @test1(i8* %p, <8 x i16> %y) { 17 entry: 18 %q = getelementptr i8, i8* %p, i64 16 19 %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) nounwind 20 call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16) 21 %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) nounwind 22 %c = add <8 x i16> %a, %b 23 ret <8 x i16> %c 24 } 25 26 declare <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8*, i32) nounwind readonly 27 declare void @llvm.arm.neon.vst1.p0i8.v8i16(i8*, <8 x i16>, i32) nounwind 28 29 ; CHECK: attributes #0 = { argmemonly nounwind readonly } 30 ; CHECK: attributes #1 = { argmemonly nounwind } 31 ; CHECK: attributes [[ATTR]] = { nounwind } 32