2003-06-29 01:09:07 +00:00
|
|
|
; This test was failing because the globals X and Y are marked incomplete
|
2003-06-29 01:03:53 +00:00
|
|
|
; in the TD graph for %test
|
2004-11-06 20:38:27 +00:00
|
|
|
; XFAIL: *
|
2003-09-15 20:02:53 +00:00
|
|
|
; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep seteq
|
2003-06-29 01:03:53 +00:00
|
|
|
|
|
|
|
%X = internal global int 20
|
|
|
|
%Y = internal global int* null
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
2003-06-29 01:09:07 +00:00
|
|
|
internal bool %test(int** %P) {
|
2003-06-29 01:03:53 +00:00
|
|
|
%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
|
|
|
|
}
|
|
|
|
|