fix PR3217: fully cached queries need to be verified against the
[oota-llvm.git] / test / Transforms / Mem2Reg / 2003-04-18-DeadBlockProblem.ll
index bdf155a4d49d983e881d4bf72fe821da17a1c387..78bfcb4197b238bdee434cd72297b0b1087bc7e5 100644 (file)
@@ -1,17 +1,16 @@
 ; This testcases makes sure that mem2reg can handle unreachable blocks.
 ; RUN: llvm-as < %s | opt -mem2reg
 
-int %test() {
-       %X = alloca int
-
-       store int 6, int* %X
+define i32 @test() {
+       %X = alloca i32         ; <i32*> [#uses=2]
+       store i32 6, i32* %X
        br label %Loop
-Loop:
-       store int 5, int* %X
+Loop:          ; preds = %EndOfLoop, %0
+       store i32 5, i32* %X
        br label %EndOfLoop
-Unreachable:
+Unreachable:           ; No predecessors!
        br label %EndOfLoop
-
-EndOfLoop:
+EndOfLoop:             ; preds = %Unreachable, %Loop
        br label %Loop
 }
+