mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +00:00
dbb6cd12eb
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6976 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
541 B
LLVM
24 lines
541 B
LLVM
; This test was failing because the globals X and Y are marked incomplete
|
|
; in the TD graph for %test
|
|
|
|
; RUN: as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine | dis | not grep seteq
|
|
|
|
%X = internal global int 20
|
|
%Y = internal global int* null
|
|
|
|
implementation
|
|
|
|
internal bool %test(int** %P) {
|
|
%A = load int** %P ;; We know P == Y!
|
|
%B = load int** %Y ;; B = A
|
|
%c = seteq int* %A, %B ;; Always true
|
|
ret bool %c
|
|
}
|
|
|
|
int %main() {
|
|
store int* %X, int** %Y
|
|
call bool %test(int** %Y)
|
|
ret int 0
|
|
}
|
|
|