mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
new testcase that DS-AA is causing to be miscompiled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1bcb9abb30
commit
4e59c642c8
26
test/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll
Normal file
26
test/Analysis/DSGraph/2005-03-24-Global-Arg-Alias.ll
Normal file
@ -0,0 +1,26 @@
|
||||
; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse | llvm-dis | grep 'load int* %L'
|
||||
|
||||
%G = internal global int* null
|
||||
|
||||
int %caller(bool %P) {
|
||||
%L = alloca int
|
||||
call void %callee(bool %P, int* %L)
|
||||
|
||||
;; At this point, G could point to L, so we can't eliminate these operations.
|
||||
%GP = load int** %G
|
||||
store int 17, int* %L
|
||||
store int 18, int* %GP ;; might clober L
|
||||
|
||||
%A = load int* %L ;; is not necessarily 17!
|
||||
ret int %A
|
||||
}
|
||||
|
||||
internal void %callee(bool %Cond, int* %P) {
|
||||
br bool %Cond, label %T, label %F
|
||||
T:
|
||||
store int* %P, int** %G
|
||||
ret void
|
||||
F:
|
||||
ret void
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user