aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll
blob: 16507e39882b13f8b1dc8e7b5eec14d454fc9046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; Mem2reg used to only add one incoming value to a PHI node, even if it had
; multiple incoming edges from a block.
;
; RUN: as < %s | opt -mem2reg -disable-output

int %test(bool %c1, bool %c2) {
	%X = alloca int
	br bool %c1, label %Exit, label %B2
B2:
	store int 2, int* %X
	br bool %c2, label %Exit, label %Exit
Exit:
	%Y = load int *%X
	ret int %Y
}