summaryrefslogtreecommitdiff
path: root/test/Transforms/Mem2Reg/UndefValuesMerge.ll
blob: dc2f011e240fba58f08ffb830425a513525f6b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg | llvm-dis | not grep phi

implementation

int %testfunc(bool %C, int %i, sbyte %j) {
	%I = alloca int
	br bool %C, label %T, label %Cont
T:
	store int %i, int* %I
	br label %Cont
Cont:
	%Y = load int* %I  ;; %Y = phi %i, undef -> %Y = %i
	ret int %Y
}