summaryrefslogtreecommitdiff
path: root/test/Transforms/DSAnalysis/structpadding.ll
blob: 8b5cc37d9a51916491f615c8344f5be3379e88ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure

%str = type { int, int* }

implementation

void %bar(%str* %S, %str* %T) {
	%A1 = getelementptr %str* %S, long 0, uint 0
	%B1 = getelementptr %str* %S, long 0, uint 1
	%A2 = getelementptr %str* %S, long 0, uint 0
	%B2 = getelementptr %str* %S, long 0, uint 1
	%a1 = cast int* %A1 to long*
	%a2 = cast int* %A2 to long*
	%V = load long* %a1
	;store long %V, long* %a2
	%V2 = load int** %B1
	store int* %V2, int** %B2
	ret void
}