blob: ebd349a6aa4fd9f62da67b36db813a4dfb828311 [file] [log] [blame]
Dan Gohmanc1be92f2010-10-18 18:04:47 +00001; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& FileCheck %s
Dan Gohman3dcc91e2010-08-04 22:56:29 +00002
Dan Gohman13007392010-08-05 23:34:50 +00003
Dan Gohman907857d2010-08-04 23:37:55 +00004; CHECK: Just Ref: call void @ro() <-> call void @f0()
Dan Gohman3dcc91e2010-08-04 22:56:29 +00005
6declare void @f0()
7declare void @ro() readonly
8
Dan Gohman13007392010-08-05 23:34:50 +00009define void @test0() {
Dan Gohman3dcc91e2010-08-04 22:56:29 +000010 call void @f0()
11 call void @ro()
12 ret void
13}
Dan Gohman13007392010-08-05 23:34:50 +000014
15; CHECK: NoModRef: call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false) <-> call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false)
16; CHECK: NoModRef: call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false) <-> call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false)
17
Chris Lattnerb85e4eb2011-06-18 06:05:24 +000018declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
Dan Gohman13007392010-08-05 23:34:50 +000019
20@A = external global i8
21@B = external global i8
22define void @test1() {
Chris Lattnerb85e4eb2011-06-18 06:05:24 +000023 call void @llvm.memset.p0i8.i64(i8* @A, i8 0, i64 1, i32 1, i1 false)
24 call void @llvm.memset.p0i8.i64(i8* @B, i8 0, i64 1, i32 1, i1 false)
Dan Gohman13007392010-08-05 23:34:50 +000025 ret void
26}