llvm.org GIT mirror llvm / release_22 test / Transforms / Mem2Reg / UndefValuesMerge.ll
release_22

Tree @release_22 (Download .tar.gz)

UndefValuesMerge.ll @release_22raw · history · blame

; 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
}