31 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 62; RUN: opt -aa-pipeline=basic-aa -passes=gvn -S < %s | FileCheck %s3 4target 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 they are7; IntrArgReadMem and have noalias pointers.8 9define <8 x i16> @test0(ptr noalias %p, ptr noalias %q, <8 x i16> %y, <8 x i1> %m, <8 x i16> %pt) {10; CHECK-LABEL: define <8 x i16> @test0(11; CHECK-SAME: ptr noalias [[P:%.*]], ptr noalias [[Q:%.*]], <8 x i16> [[Y:%.*]], <8 x i1> [[M:%.*]], <8 x i16> [[PT:%.*]]) {12; CHECK-NEXT: [[ENTRY:.*:]]13; CHECK-NEXT: [[A:%.*]] = call <8 x i16> @llvm.masked.load.v8i16.p0(ptr align 16 [[P]], <8 x i1> [[M]], <8 x i16> [[PT]])14; CHECK-NEXT: call void @llvm.masked.store.v8i16.p0(<8 x i16> [[Y]], ptr align 16 [[Q]], <8 x i1> [[M]])15; CHECK-NEXT: [[C:%.*]] = add <8 x i16> [[A]], [[A]]16; CHECK-NEXT: ret <8 x i16> [[C]]17;18entry:19 %a = call <8 x i16> @llvm.masked.load.v8i16.p0(ptr %p, i32 16, <8 x i1> %m, <8 x i16> %pt) nounwind20 call void @llvm.masked.store.v8i16.p0(<8 x i16> %y, ptr %q, i32 16, <8 x i1> %m)21 %b = call <8 x i16> @llvm.masked.load.v8i16.p0(ptr %p, i32 16, <8 x i1> %m, <8 x i16> %pt) nounwind22 %c = add <8 x i16> %a, %b23 ret <8 x i16> %c24}25 26declare <8 x i16> @llvm.masked.load.v8i16.p0(ptr, i32, <8 x i1>, <8 x i16>) nounwind readonly27declare void @llvm.masked.store.v8i16.p0(<8 x i16>, ptr, i32, <8 x i1>) nounwind28 29; CHECK: attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }30; CHECK: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: write) }31