For PR761:
[oota-llvm.git] / test / Transforms / LCSSA / 2006-06-03-IncorrectIDFPhis.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \
2 ; RUN:   grep "%SJE.0.0.lcssa = phi .struct.SetJmpMapEntry" &&
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa | llvm-dis | \
4 ; RUN:   grep "%SJE.0.0.lcssa1 = phi .struct.SetJmpMapEntry"
5
6 %struct.SetJmpMapEntry = type { sbyte*, uint, %struct.SetJmpMapEntry* }
7
8 implementation   ; Functions:
9
10 void %__llvm_sjljeh_try_catching_longjmp_exception() {
11 entry:
12         br bool false, label %UnifiedReturnBlock, label %no_exit
13
14 no_exit:                ; preds = %endif, %entry
15         %SJE.0.0 = phi %struct.SetJmpMapEntry* [ %tmp.24, %endif ], [ null, %entry ]            ; <%struct.SetJmpMapEntry*> [#uses=1]
16         br bool false, label %then, label %endif
17
18 then:           ; preds = %no_exit
19         %tmp.20 = getelementptr %struct.SetJmpMapEntry* %SJE.0.0, int 0, uint 1         ; <uint*> [#uses=0]
20         ret void
21
22 endif:          ; preds = %no_exit
23         %tmp.24 = load %struct.SetJmpMapEntry** null            ; <%struct.SetJmpMapEntry*> [#uses=1]
24         br bool false, label %UnifiedReturnBlock, label %no_exit
25
26 UnifiedReturnBlock:             ; preds = %endif, %entry
27         ret void
28 }