blob: d6f1b779e194f39dac2e05872553cbbef63deb6d [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; This testcases makes sure that mem2reg can handle unreachable blocks.
2; RUN: llvm-upgrade < %s | llvm-as | opt -mem2reg
3
4int %test() {
5 %X = alloca int
6
7 store int 6, int* %X
8 br label %Loop
9Loop:
10 store int 5, int* %X
11 br label %EndOfLoop
12Unreachable:
13 br label %EndOfLoop
14
15EndOfLoop:
16 br label %Loop
17}