aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/DSGraph/incompletenode.ll
blob: c94faf08946742fe908ce3378d027d685cd896f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; This test was failing because the globals X and Y are marked incomplete
; in the TD graph for %test
; XFAIL: *
; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse -instcombine | llvm-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
}