mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-20 11:29:24 +00:00
I think this is all of the stuff I had pending in my tree.. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13703 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
635 B
LLVM
23 lines
635 B
LLVM
; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | grep store | not grep null
|
|
|
|
; Because the 'internal' function is passed to an external function, we don't
|
|
; know what the incoming values will alias. As such, we cannot do the
|
|
; optimization checked by the 'arg-must-alias.llx' test.
|
|
|
|
declare void %external(int(int*)*)
|
|
%G = internal constant int* null
|
|
|
|
implementation
|
|
|
|
internal int %internal(int* %ARG) {
|
|
;;; We *DON'T* know that ARG always points to null!
|
|
store int* %ARG, int** %G
|
|
ret int 0
|
|
}
|
|
|
|
int %foo() {
|
|
call void %external(int(int*)* %internal)
|
|
%V = call int %internal(int* null)
|
|
ret int %V
|
|
}
|