From 9bbd007f155a25000078417db32e2313b84f5f35 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 29 Jun 2010 18:17:11 +0000 Subject: [PATCH] Add a few more interesting testcases. llvm-svn: 107177 --- llvm/test/Analysis/BasicAA/interprocedural.ll | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/llvm/test/Analysis/BasicAA/interprocedural.ll b/llvm/test/Analysis/BasicAA/interprocedural.ll index 2195716cdf89..8d34695fe5d5 100644 --- a/llvm/test/Analysis/BasicAA/interprocedural.ll +++ b/llvm/test/Analysis/BasicAA/interprocedural.ll @@ -40,3 +40,24 @@ define i64* @r0(i64* %u) { store i64 0, i64* %v ret i64* %t } + +; The noalias attribute is not necessarily safe in an interprocedural context even +; in comparison to other noalias arguments in the same function. +; CHECK: MayAlias: i8* %w, i8* %x + +define void @q0(i8* noalias %w, i8* noalias %x) { + store i8 0, i8* %w + store i8 0, i8* %x + call void @q0(i8* noalias %x, i8* noalias %w) + unreachable +} + +; The noalias attribute is not necessarily safe in an interprocedural context. +; CHECK: MayAlias: double* %y, double* @G + +@G = external global double +define void @p0(double* noalias %y) { + store double 0.0, double* %y + store double 0.0, double* @G + unreachable +}