mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-04 07:32:13 +00:00
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30683 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e831b9a48b
commit
b363312940
23
test/Analysis/GlobalsModRef/indirect-global.ll
Normal file
23
test/Analysis/GlobalsModRef/indirect-global.ll
Normal file
@ -0,0 +1,23 @@
|
||||
; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
|
||||
%G = internal global int* null
|
||||
|
||||
implementation
|
||||
|
||||
void %test() {
|
||||
%A = malloc int
|
||||
store int* %A, int** %G
|
||||
ret void
|
||||
}
|
||||
|
||||
int %test1(int *%P) {
|
||||
%g1 = load int** %G
|
||||
%h1 = load int* %g1
|
||||
|
||||
; This store cannot alias either G or g1.
|
||||
store int 123, int* %P
|
||||
|
||||
%g2 = load int** %G
|
||||
%h2 = load int* %g1
|
||||
%X = sub int %h1, %h2 ;; -> 0
|
||||
ret int %X
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user