summaryrefslogtreecommitdiff
path: root/test/Analysis/Andersens/arg-must-alias.ll
blob: 5aef808b84ada42eddd3010188ca8c5c9c7eab5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | not grep ARG

%G = internal constant int* null

implementation

internal int %internal(int* %ARG) {
	;; The 'Arg' argument must-aliases the null pointer, so it can be subsituted
	;; directly here, making it dead.
	store int* %ARG, int** %G
	ret int 0
}

int %foo() {
	%V = call int %internal(int* null)
	ret int %V
}