2011-04-28 02:39:03 +08:00
|
|
|
; RUN: opt -basicaa -gvn -S < %s | FileCheck %s
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
; BasicAA should prove that these calls don't interfere, since they are
|
|
|
|
; IntrArgReadMem and have noalias pointers.
|
|
|
|
|
2017-05-13 08:12:52 +08:00
|
|
|
; CHECK: define <8 x i16> @test0(<8 x i16>* noalias %p, <8 x i16>* noalias %q, <8 x i16> %y, <8 x i1> %m, <8 x i16> %pt) {
|
2011-04-28 02:39:03 +08:00
|
|
|
; CHECK-NEXT: entry:
|
2017-05-13 08:12:52 +08:00
|
|
|
; CHECK-NEXT: %a = call <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>* %p, i32 16, <8 x i1> %m, <8 x i16> %pt) [[ATTR:#[0-9]+]]
|
|
|
|
; CHECK-NEXT: call void @llvm.masked.store.v8i16.p0v8i16(<8 x i16> %y, <8 x i16>* %q, i32 16, <8 x i1> %m)
|
2011-04-28 02:39:03 +08:00
|
|
|
; CHECK-NEXT: %c = add <8 x i16> %a, %a
|
2017-05-13 08:12:52 +08:00
|
|
|
define <8 x i16> @test0(<8 x i16>* noalias %p, <8 x i16>* noalias %q, <8 x i16> %y, <8 x i1> %m, <8 x i16> %pt) {
|
2011-04-28 02:39:03 +08:00
|
|
|
entry:
|
2017-05-13 08:12:52 +08:00
|
|
|
%a = call <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>* %p, i32 16, <8 x i1> %m, <8 x i16> %pt) nounwind
|
|
|
|
call void @llvm.masked.store.v8i16.p0v8i16(<8 x i16> %y, <8 x i16>* %q, i32 16, <8 x i1> %m)
|
|
|
|
%b = call <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>* %p, i32 16, <8 x i1> %m, <8 x i16> %pt) nounwind
|
2011-04-28 02:39:03 +08:00
|
|
|
%c = add <8 x i16> %a, %b
|
|
|
|
ret <8 x i16> %c
|
|
|
|
}
|
|
|
|
|
2017-05-13 08:12:52 +08:00
|
|
|
declare <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>*, i32, <8 x i1>, <8 x i16>) nounwind readonly
|
|
|
|
declare void @llvm.masked.store.v8i16.p0v8i16(<8 x i16>, <8 x i16>*, i32, <8 x i1>) nounwind
|
2013-02-20 15:21:42 +08:00
|
|
|
|
2019-07-28 14:09:56 +08:00
|
|
|
; CHECK: attributes #0 = { argmemonly nounwind readonly willreturn }
|
|
|
|
; CHECK: attributes #1 = { argmemonly nounwind willreturn }
|
2013-02-22 17:09:42 +08:00
|
|
|
; CHECK: attributes [[ATTR]] = { nounwind }
|