summaryrefslogtreecommitdiff
path: root/test/Transforms/DSAnalysis/goodcases.ll
blob: 26066056eefd336e71fbb2cc320926a339647744 (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 file contains a list of cases where node folding should NOT happen
;
; RUN: llvm-as < %s | opt -analyze -tddatastructure
;

implementation

void %test1({int, int}* %X) {
        getelementptr {int, int} * %X, long 0
        %Y = cast {int, int}* %X to uint*
        store uint 5, uint* %Y
        ret void
}

; Test that "structural" equality works.  Pointers can land in pointers n 
; stuff.
void %test2({int*, int*}* %X) {
	getelementptr {int*, int*}* %X, long 0
	%Y = cast {int*, int*}* %X to {uint*, long*}*
	getelementptr {uint*, long*}* %Y, long 0
	ret void
}