blob: a829999f446346c06ca7327f86d6f89add2594cc [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | grep store | not grep null
2
3; Because the 'internal' function is passed to an external function, we don't
4; know what the incoming values will alias. As such, we cannot do the
5; optimization checked by the 'arg-must-alias.llx' test.
6
7declare void %external(int(int*)*)
8%G = internal constant int* null
9
10implementation
11
12internal int %internal(int* %ARG) {
13 ;;; We *DON'T* know that ARG always points to null!
14 store int* %ARG, int** %G
15 ret int 0
16}
17
18int %foo() {
19 call void %external(int(int*)* %internal)
20 %V = call int %internal(int* null)
21 ret int %V
22}