You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
@ -1,22 +0,0 @@
|
||||
; RUN: opt < %s -loop-simplify -lcssa -S | FileCheck %s
|
||||
|
||||
%struct.SetJmpMapEntry = type { i8*, i32, %struct.SetJmpMapEntry* }
|
||||
|
||||
define void @__llvm_sjljeh_try_catching_longjmp_exception() {
|
||||
; CHECK-LABEL: @__llvm_sjljeh_try_catching_longjmp_exception
|
||||
entry:
|
||||
br i1 false, label %UnifiedReturnBlock, label %no_exit
|
||||
no_exit: ; preds = %endif, %entry
|
||||
%SJE.0.0 = phi %struct.SetJmpMapEntry* [ %tmp.24, %endif ], [ null, %entry ] ; <%struct.SetJmpMapEntry*> [#uses=1]
|
||||
br i1 false, label %then, label %endif
|
||||
then: ; preds = %no_exit
|
||||
; CHECK: %SJE.0.0.lcssa = phi %struct.SetJmpMapEntry
|
||||
%tmp.20 = getelementptr %struct.SetJmpMapEntry, %struct.SetJmpMapEntry* %SJE.0.0, i32 0, i32 1 ; <i32*> [#uses=0]
|
||||
ret void
|
||||
endif: ; preds = %no_exit
|
||||
%tmp.24 = load %struct.SetJmpMapEntry*, %struct.SetJmpMapEntry** null ; <%struct.SetJmpMapEntry*> [#uses=1]
|
||||
br i1 false, label %UnifiedReturnBlock, label %no_exit
|
||||
UnifiedReturnBlock: ; preds = %endif, %entry
|
||||
ret void
|
||||
}
|
||||
|
@ -1,28 +0,0 @@
|
||||
; RUN: opt < %s -lcssa -S | FileCheck %s
|
||||
; RUN: opt < %s -passes=lcssa -S | FileCheck %s
|
||||
|
||||
declare i1 @c1()
|
||||
|
||||
declare i1 @c2()
|
||||
|
||||
define i32 @foo() {
|
||||
; CHECK-LABEL: @foo
|
||||
entry:
|
||||
br label %loop_begin
|
||||
loop_begin: ; preds = %loop_body.2, %entry
|
||||
br i1 true, label %loop_body.1, label %loop_exit2
|
||||
loop_body.1: ; preds = %loop_begin
|
||||
%X.1 = add i32 0, 1 ; <i32> [#uses=1]
|
||||
%rel.1 = call i1 @c1( ) ; <i1> [#uses=1]
|
||||
br i1 %rel.1, label %loop_exit, label %loop_body.2
|
||||
loop_body.2: ; preds = %loop_body.1
|
||||
%rel.2 = call i1 @c2( ) ; <i1> [#uses=1]
|
||||
br i1 %rel.2, label %loop_exit, label %loop_begin
|
||||
loop_exit: ; preds = %loop_body.2, %loop_body.1
|
||||
; CHECK: %X.1.lcssa = phi
|
||||
ret i32 %X.1
|
||||
loop_exit2: ; preds = %loop_begin
|
||||
ret i32 1
|
||||
; CHECK-NOT: %X.1.lcssa1
|
||||
}
|
||||
|
@ -1,25 +0,0 @@
|
||||
; RUN: opt < %s -lcssa
|
||||
; RUN: opt < %s -passes=lcssa
|
||||
|
||||
%struct.SetJmpMapEntry = type { i8*, i32, %struct.SetJmpMapEntry* }
|
||||
|
||||
define void @__llvm_sjljeh_try_catching_longjmp_exception() {
|
||||
entry:
|
||||
br label %loopentry
|
||||
loopentry: ; preds = %endif, %entry
|
||||
%SJE.0 = phi %struct.SetJmpMapEntry* [ null, %entry ], [ %tmp.25, %endif ] ; <%struct.SetJmpMapEntry*> [#uses=1]
|
||||
br i1 false, label %no_exit, label %loopexit
|
||||
no_exit: ; preds = %loopentry
|
||||
br i1 false, label %then, label %endif
|
||||
then: ; preds = %no_exit
|
||||
%tmp.21 = getelementptr %struct.SetJmpMapEntry, %struct.SetJmpMapEntry* %SJE.0, i32 0, i32 1 ; <i32*> [#uses=0]
|
||||
br label %return
|
||||
endif: ; preds = %no_exit
|
||||
%tmp.25 = load %struct.SetJmpMapEntry*, %struct.SetJmpMapEntry** null ; <%struct.SetJmpMapEntry*> [#uses=1]
|
||||
br label %loopentry
|
||||
loopexit: ; preds = %loopentry
|
||||
br label %return
|
||||
return: ; preds = %loopexit, %then
|
||||
ret void
|
||||
}
|
||||
|
@ -1,145 +0,0 @@
|
||||
; RUN: opt < %s -lcssa -disable-output -verify-dom-info -verify-loop-info
|
||||
; PR977
|
||||
; END.
|
||||
declare i32 @opost_block()
|
||||
|
||||
define void @write_chan() {
|
||||
entry:
|
||||
br i1 false, label %shortcirc_next.0, label %shortcirc_done.0
|
||||
shortcirc_next.0: ; preds = %entry
|
||||
br label %shortcirc_done.0
|
||||
shortcirc_done.0: ; preds = %shortcirc_next.0, %entry
|
||||
br i1 false, label %shortcirc_next.1, label %shortcirc_done.1
|
||||
shortcirc_next.1: ; preds = %shortcirc_done.0
|
||||
br label %shortcirc_done.1
|
||||
shortcirc_done.1: ; preds = %shortcirc_next.1, %shortcirc_done.0
|
||||
br i1 false, label %then.0, label %endif.0
|
||||
then.0: ; preds = %shortcirc_done.1
|
||||
br i1 false, label %then.1, label %endif.1
|
||||
then.1: ; preds = %then.0
|
||||
br label %return
|
||||
after_ret.0: ; No predecessors!
|
||||
br label %endif.1
|
||||
endif.1: ; preds = %after_ret.0, %then.0
|
||||
br label %endif.0
|
||||
endif.0: ; preds = %endif.1, %shortcirc_done.1
|
||||
br label %loopentry.0
|
||||
loopentry.0: ; preds = %endif.12, %endif.0
|
||||
br i1 false, label %then.2, label %endif.2
|
||||
then.2: ; preds = %loopentry.0
|
||||
br label %loopexit.0
|
||||
dead_block_after_break.0: ; No predecessors!
|
||||
br label %endif.2
|
||||
endif.2: ; preds = %dead_block_after_break.0, %loopentry.0
|
||||
br i1 false, label %shortcirc_done.2, label %shortcirc_next.2
|
||||
shortcirc_next.2: ; preds = %endif.2
|
||||
br i1 false, label %shortcirc_next.3, label %shortcirc_done.3
|
||||
shortcirc_next.3: ; preds = %shortcirc_next.2
|
||||
br label %shortcirc_done.3
|
||||
shortcirc_done.3: ; preds = %shortcirc_next.3, %shortcirc_next.2
|
||||
br label %shortcirc_done.2
|
||||
shortcirc_done.2: ; preds = %shortcirc_done.3, %endif.2
|
||||
br i1 false, label %then.3, label %endif.3
|
||||
then.3: ; preds = %shortcirc_done.2
|
||||
br label %loopexit.0
|
||||
dead_block_after_break.1: ; No predecessors!
|
||||
br label %endif.3
|
||||
endif.3: ; preds = %dead_block_after_break.1, %shortcirc_done.2
|
||||
br i1 false, label %shortcirc_next.4, label %shortcirc_done.4
|
||||
shortcirc_next.4: ; preds = %endif.3
|
||||
br label %shortcirc_done.4
|
||||
shortcirc_done.4: ; preds = %shortcirc_next.4, %endif.3
|
||||
br i1 false, label %then.4, label %else
|
||||
then.4: ; preds = %shortcirc_done.4
|
||||
br label %loopentry.1
|
||||
loopentry.1: ; preds = %endif.8, %then.4
|
||||
br i1 false, label %no_exit, label %loopexit.1
|
||||
no_exit: ; preds = %loopentry.1
|
||||
%tmp.94 = call i32 @opost_block( ) ; <i32> [#uses=1]
|
||||
br i1 false, label %then.5, label %endif.5
|
||||
then.5: ; preds = %no_exit
|
||||
br i1 false, label %then.6, label %endif.6
|
||||
then.6: ; preds = %then.5
|
||||
br label %loopexit.1
|
||||
dead_block_after_break.2: ; No predecessors!
|
||||
br label %endif.6
|
||||
endif.6: ; preds = %dead_block_after_break.2, %then.5
|
||||
br label %break_out
|
||||
dead_block_after_goto.0: ; No predecessors!
|
||||
br label %endif.5
|
||||
endif.5: ; preds = %dead_block_after_goto.0, %no_exit
|
||||
br i1 false, label %then.7, label %endif.7
|
||||
then.7: ; preds = %endif.5
|
||||
br label %loopexit.1
|
||||
dead_block_after_break.3: ; No predecessors!
|
||||
br label %endif.7
|
||||
endif.7: ; preds = %dead_block_after_break.3, %endif.5
|
||||
switch i32 1, label %switchexit [
|
||||
i32 4, label %label.2
|
||||
i32 2, label %label.1
|
||||
i32 1, label %label.0
|
||||
]
|
||||
label.0: ; preds = %endif.7
|
||||
br label %switchexit
|
||||
dead_block_after_break.4: ; No predecessors!
|
||||
br label %label.1
|
||||
label.1: ; preds = %dead_block_after_break.4, %endif.7
|
||||
br label %switchexit
|
||||
dead_block_after_break.5: ; No predecessors!
|
||||
br label %label.2
|
||||
label.2: ; preds = %dead_block_after_break.5, %endif.7
|
||||
br label %switchexit
|
||||
dead_block_after_break.6: ; No predecessors!
|
||||
br label %switchexit
|
||||
switchexit: ; preds = %dead_block_after_break.6, %label.2, %label.1, %label.0, %endif.7
|
||||
br i1 false, label %then.8, label %endif.8
|
||||
then.8: ; preds = %switchexit
|
||||
br label %loopexit.1
|
||||
dead_block_after_break.7: ; No predecessors!
|
||||
br label %endif.8
|
||||
endif.8: ; preds = %dead_block_after_break.7, %switchexit
|
||||
br label %loopentry.1
|
||||
loopexit.1: ; preds = %then.8, %then.7, %then.6, %loopentry.1
|
||||
br i1 false, label %then.9, label %endif.9
|
||||
then.9: ; preds = %loopexit.1
|
||||
br label %endif.9
|
||||
endif.9: ; preds = %then.9, %loopexit.1
|
||||
br label %endif.4
|
||||
else: ; preds = %shortcirc_done.4
|
||||
br i1 false, label %then.10, label %endif.10
|
||||
then.10: ; preds = %else
|
||||
br label %break_out
|
||||
dead_block_after_goto.1: ; No predecessors!
|
||||
br label %endif.10
|
||||
endif.10: ; preds = %dead_block_after_goto.1, %else
|
||||
br label %endif.4
|
||||
endif.4: ; preds = %endif.10, %endif.9
|
||||
br i1 false, label %then.11, label %endif.11
|
||||
then.11: ; preds = %endif.4
|
||||
br label %loopexit.0
|
||||
dead_block_after_break.8: ; No predecessors!
|
||||
br label %endif.11
|
||||
endif.11: ; preds = %dead_block_after_break.8, %endif.4
|
||||
br i1 false, label %then.12, label %endif.12
|
||||
then.12: ; preds = %endif.11
|
||||
br label %loopexit.0
|
||||
dead_block_after_break.9: ; No predecessors!
|
||||
br label %endif.12
|
||||
endif.12: ; preds = %dead_block_after_break.9, %endif.11
|
||||
br label %loopentry.0
|
||||
loopexit.0: ; preds = %then.12, %then.11, %then.3, %then.2
|
||||
br label %break_out
|
||||
break_out: ; preds = %loopexit.0, %then.10, %endif.6
|
||||
%retval.3 = phi i32 [ 0, %loopexit.0 ], [ %tmp.94, %endif.6 ], [ 0, %then.10 ] ; <i32> [#uses=0]
|
||||
br i1 false, label %cond_true, label %cond_false
|
||||
cond_true: ; preds = %break_out
|
||||
br label %cond_continue
|
||||
cond_false: ; preds = %break_out
|
||||
br label %cond_continue
|
||||
cond_continue: ; preds = %cond_false, %cond_true
|
||||
br label %return
|
||||
after_ret.1: ; No predecessors!
|
||||
br label %return
|
||||
return: ; preds = %after_ret.1, %cond_continue, %then.1
|
||||
ret void
|
||||
}
|
@ -1,185 +0,0 @@
|
||||
; RUN: opt < %s -lcssa -disable-output
|
||||
; RUN: opt < %s -passes=lcssa -disable-output
|
||||
; PR977
|
||||
; END.
|
||||
|
||||
define void @process_backlog() {
|
||||
entry:
|
||||
br label %loopentry.preheader
|
||||
loopentry.preheader: ; preds = %dead_block_after_break, %entry
|
||||
%work.0.ph = phi i32 [ %inc, %dead_block_after_break ], [ 0, %entry ] ; <i32> [#uses=0]
|
||||
br label %loopentry
|
||||
loopentry: ; preds = %endif.1, %loopentry.preheader
|
||||
br i1 false, label %then.i, label %loopentry.__skb_dequeue67.exit_crit_edge
|
||||
loopentry.__skb_dequeue67.exit_crit_edge: ; preds = %loopentry
|
||||
br label %__skb_dequeue67.exit
|
||||
then.i: ; preds = %loopentry
|
||||
br label %__skb_dequeue67.exit
|
||||
__skb_dequeue67.exit: ; preds = %then.i, %loopentry.__skb_dequeue67.exit_crit_edge
|
||||
br i1 false, label %then.0, label %__skb_dequeue67.exit.endif.0_crit_edge
|
||||
__skb_dequeue67.exit.endif.0_crit_edge: ; preds = %__skb_dequeue67.exit
|
||||
br label %endif.0
|
||||
then.0: ; preds = %__skb_dequeue67.exit
|
||||
br label %job_done
|
||||
dead_block_after_goto: ; No predecessors!
|
||||
unreachable
|
||||
endif.0: ; preds = %__skb_dequeue67.exit.endif.0_crit_edge
|
||||
br i1 false, label %then.0.i, label %endif.0.endif.0.i_crit_edge
|
||||
endif.0.endif.0.i_crit_edge: ; preds = %endif.0
|
||||
br label %endif.0.i
|
||||
then.0.i: ; preds = %endif.0
|
||||
br label %endif.0.i
|
||||
endif.0.i: ; preds = %then.0.i, %endif.0.endif.0.i_crit_edge
|
||||
br i1 false, label %then.i.i, label %endif.0.i.skb_bond.exit.i_crit_edge
|
||||
endif.0.i.skb_bond.exit.i_crit_edge: ; preds = %endif.0.i
|
||||
br label %skb_bond.exit.i
|
||||
then.i.i: ; preds = %endif.0.i
|
||||
br label %skb_bond.exit.i
|
||||
skb_bond.exit.i: ; preds = %then.i.i, %endif.0.i.skb_bond.exit.i_crit_edge
|
||||
br label %loopentry.0.i
|
||||
loopentry.0.i: ; preds = %loopentry.0.i.backedge, %skb_bond.exit.i
|
||||
br i1 false, label %loopentry.0.i.no_exit.0.i_crit_edge, label %loopentry.0.i.loopexit.0.i_crit_edge
|
||||
loopentry.0.i.loopexit.0.i_crit_edge: ; preds = %loopentry.0.i
|
||||
br label %loopexit.0.i
|
||||
loopentry.0.i.no_exit.0.i_crit_edge: ; preds = %loopentry.0.i
|
||||
br label %no_exit.0.i
|
||||
no_exit.0.i: ; preds = %then.3.i.no_exit.0.i_crit_edge, %loopentry.0.i.no_exit.0.i_crit_edge
|
||||
br i1 false, label %no_exit.0.i.shortcirc_done.0.i_crit_edge, label %shortcirc_next.0.i
|
||||
no_exit.0.i.shortcirc_done.0.i_crit_edge: ; preds = %no_exit.0.i
|
||||
br label %shortcirc_done.0.i
|
||||
shortcirc_next.0.i: ; preds = %no_exit.0.i
|
||||
br label %shortcirc_done.0.i
|
||||
shortcirc_done.0.i: ; preds = %shortcirc_next.0.i, %no_exit.0.i.shortcirc_done.0.i_crit_edge
|
||||
br i1 false, label %then.1.i, label %endif.1.i
|
||||
then.1.i: ; preds = %shortcirc_done.0.i
|
||||
br i1 false, label %then.2.i, label %then.1.i.endif.2.i_crit_edge
|
||||
then.1.i.endif.2.i_crit_edge: ; preds = %then.1.i
|
||||
br label %endif.2.i
|
||||
then.2.i: ; preds = %then.1.i
|
||||
br i1 false, label %then.3.i, label %else.0.i
|
||||
then.3.i: ; preds = %then.2.i
|
||||
br i1 false, label %then.3.i.no_exit.0.i_crit_edge, label %then.3.i.loopexit.0.i_crit_edge
|
||||
then.3.i.loopexit.0.i_crit_edge: ; preds = %then.3.i
|
||||
br label %loopexit.0.i
|
||||
then.3.i.no_exit.0.i_crit_edge: ; preds = %then.3.i
|
||||
br label %no_exit.0.i
|
||||
else.0.i: ; preds = %then.2.i
|
||||
br label %endif.2.i
|
||||
endif.3.i: ; No predecessors!
|
||||
unreachable
|
||||
endif.2.i: ; preds = %else.0.i, %then.1.i.endif.2.i_crit_edge
|
||||
br label %loopentry.0.i.backedge
|
||||
endif.1.i: ; preds = %shortcirc_done.0.i
|
||||
br label %loopentry.0.i.backedge
|
||||
loopentry.0.i.backedge: ; preds = %endif.1.i, %endif.2.i
|
||||
br label %loopentry.0.i
|
||||
loopexit.0.i: ; preds = %then.3.i.loopexit.0.i_crit_edge, %loopentry.0.i.loopexit.0.i_crit_edge
|
||||
br label %loopentry.1.i
|
||||
loopentry.1.i: ; preds = %loopentry.1.i.backedge, %loopexit.0.i
|
||||
br i1 false, label %loopentry.1.i.no_exit.1.i_crit_edge, label %loopentry.1.i.loopexit.1.i_crit_edge
|
||||
loopentry.1.i.loopexit.1.i_crit_edge: ; preds = %loopentry.1.i
|
||||
br label %loopexit.1.i
|
||||
loopentry.1.i.no_exit.1.i_crit_edge: ; preds = %loopentry.1.i
|
||||
br label %no_exit.1.i
|
||||
no_exit.1.i: ; preds = %then.6.i.no_exit.1.i_crit_edge, %loopentry.1.i.no_exit.1.i_crit_edge
|
||||
br i1 false, label %shortcirc_next.1.i, label %no_exit.1.i.shortcirc_done.1.i_crit_edge
|
||||
no_exit.1.i.shortcirc_done.1.i_crit_edge: ; preds = %no_exit.1.i
|
||||
br label %shortcirc_done.1.i
|
||||
shortcirc_next.1.i: ; preds = %no_exit.1.i
|
||||
br i1 false, label %shortcirc_next.1.i.shortcirc_done.2.i_crit_edge, label %shortcirc_next.2.i
|
||||
shortcirc_next.1.i.shortcirc_done.2.i_crit_edge: ; preds = %shortcirc_next.1.i
|
||||
br label %shortcirc_done.2.i
|
||||
shortcirc_next.2.i: ; preds = %shortcirc_next.1.i
|
||||
br label %shortcirc_done.2.i
|
||||
shortcirc_done.2.i: ; preds = %shortcirc_next.2.i, %shortcirc_next.1.i.shortcirc_done.2.i_crit_edge
|
||||
br label %shortcirc_done.1.i
|
||||
shortcirc_done.1.i: ; preds = %shortcirc_done.2.i, %no_exit.1.i.shortcirc_done.1.i_crit_edge
|
||||
br i1 false, label %then.4.i, label %endif.4.i
|
||||
then.4.i: ; preds = %shortcirc_done.1.i
|
||||
br i1 false, label %then.5.i, label %then.4.i.endif.5.i_crit_edge
|
||||
then.4.i.endif.5.i_crit_edge: ; preds = %then.4.i
|
||||
br label %endif.5.i
|
||||
then.5.i: ; preds = %then.4.i
|
||||
br i1 false, label %then.6.i, label %else.1.i
|
||||
then.6.i: ; preds = %then.5.i
|
||||
br i1 false, label %then.6.i.no_exit.1.i_crit_edge, label %then.6.i.loopexit.1.i_crit_edge
|
||||
then.6.i.loopexit.1.i_crit_edge: ; preds = %then.6.i
|
||||
br label %loopexit.1.i
|
||||
then.6.i.no_exit.1.i_crit_edge: ; preds = %then.6.i
|
||||
br label %no_exit.1.i
|
||||
else.1.i: ; preds = %then.5.i
|
||||
br label %endif.5.i
|
||||
endif.6.i: ; No predecessors!
|
||||
unreachable
|
||||
endif.5.i: ; preds = %else.1.i, %then.4.i.endif.5.i_crit_edge
|
||||
br label %loopentry.1.i.backedge
|
||||
endif.4.i: ; preds = %shortcirc_done.1.i
|
||||
br label %loopentry.1.i.backedge
|
||||
loopentry.1.i.backedge: ; preds = %endif.4.i, %endif.5.i
|
||||
br label %loopentry.1.i
|
||||
loopexit.1.i: ; preds = %then.6.i.loopexit.1.i_crit_edge, %loopentry.1.i.loopexit.1.i_crit_edge
|
||||
br i1 false, label %then.7.i, label %else.2.i
|
||||
then.7.i: ; preds = %loopexit.1.i
|
||||
br i1 false, label %then.8.i, label %else.3.i
|
||||
then.8.i: ; preds = %then.7.i
|
||||
br label %netif_receive_skb.exit
|
||||
else.3.i: ; preds = %then.7.i
|
||||
br label %netif_receive_skb.exit
|
||||
endif.8.i: ; No predecessors!
|
||||
unreachable
|
||||
else.2.i: ; preds = %loopexit.1.i
|
||||
br i1 false, label %else.2.i.shortcirc_done.i.i_crit_edge, label %shortcirc_next.i.i
|
||||
else.2.i.shortcirc_done.i.i_crit_edge: ; preds = %else.2.i
|
||||
br label %shortcirc_done.i.i
|
||||
shortcirc_next.i.i: ; preds = %else.2.i
|
||||
br label %shortcirc_done.i.i
|
||||
shortcirc_done.i.i: ; preds = %shortcirc_next.i.i, %else.2.i.shortcirc_done.i.i_crit_edge
|
||||
br i1 false, label %then.i1.i, label %shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge
|
||||
shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge: ; preds = %shortcirc_done.i.i
|
||||
br label %kfree_skb65.exit.i
|
||||
then.i1.i: ; preds = %shortcirc_done.i.i
|
||||
br label %kfree_skb65.exit.i
|
||||
kfree_skb65.exit.i: ; preds = %then.i1.i, %shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge
|
||||
br label %netif_receive_skb.exit
|
||||
netif_receive_skb.exit: ; preds = %kfree_skb65.exit.i, %else.3.i, %then.8.i
|
||||
br i1 false, label %then.i1, label %netif_receive_skb.exit.dev_put69.exit_crit_edge
|
||||
netif_receive_skb.exit.dev_put69.exit_crit_edge: ; preds = %netif_receive_skb.exit
|
||||
br label %dev_put69.exit
|
||||
then.i1: ; preds = %netif_receive_skb.exit
|
||||
br label %dev_put69.exit
|
||||
dev_put69.exit: ; preds = %then.i1, %netif_receive_skb.exit.dev_put69.exit_crit_edge
|
||||
%inc = add i32 0, 1 ; <i32> [#uses=1]
|
||||
br i1 false, label %dev_put69.exit.shortcirc_done_crit_edge, label %shortcirc_next
|
||||
dev_put69.exit.shortcirc_done_crit_edge: ; preds = %dev_put69.exit
|
||||
br label %shortcirc_done
|
||||
shortcirc_next: ; preds = %dev_put69.exit
|
||||
br label %shortcirc_done
|
||||
shortcirc_done: ; preds = %shortcirc_next, %dev_put69.exit.shortcirc_done_crit_edge
|
||||
br i1 false, label %then.1, label %endif.1
|
||||
then.1: ; preds = %shortcirc_done
|
||||
ret void
|
||||
dead_block_after_break: ; No predecessors!
|
||||
br label %loopentry.preheader
|
||||
endif.1: ; preds = %shortcirc_done
|
||||
br label %loopentry
|
||||
loopexit: ; No predecessors!
|
||||
unreachable
|
||||
after_ret.0: ; No predecessors!
|
||||
br label %job_done
|
||||
job_done: ; preds = %after_ret.0, %then.0
|
||||
br label %loopentry.i
|
||||
loopentry.i: ; preds = %no_exit.i, %job_done
|
||||
br i1 false, label %no_exit.i, label %clear_bit62.exit
|
||||
no_exit.i: ; preds = %loopentry.i
|
||||
br label %loopentry.i
|
||||
clear_bit62.exit: ; preds = %loopentry.i
|
||||
br i1 false, label %then.2, label %endif.2
|
||||
then.2: ; preds = %clear_bit62.exit
|
||||
ret void
|
||||
endif.2: ; preds = %clear_bit62.exit
|
||||
ret void
|
||||
after_ret.1: ; No predecessors!
|
||||
ret void
|
||||
return: ; No predecessors!
|
||||
unreachable
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
; RUN: opt < %s -loop-rotate -licm -loop-unswitch -disable-output
|
||||
define i32 @main(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
br label %bb7
|
||||
|
||||
bb7: ; preds = %bb7, %entry
|
||||
%tmp39 = load <4 x float>, <4 x float>* null ; <<4 x float>> [#uses=1]
|
||||
%tmp40 = fadd <4 x float> %tmp39, < float 2.000000e+00, float 3.000000e+00, float 1.000000e+00, float 0.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp43 = fadd <4 x float> %tmp40, < float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 2.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp46 = fadd <4 x float> %tmp43, < float 3.000000e+00, float 0.000000e+00, float 2.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp49 = fadd <4 x float> %tmp46, < float 0.000000e+00, float 4.000000e+00, float 6.000000e+00, float 1.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
store <4 x float> %tmp49, <4 x float>* null
|
||||
br i1 false, label %bb7, label %bb56
|
||||
|
||||
bb56: ; preds = %bb7
|
||||
ret i32 0
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
; RUN: opt < %s -loop-rotate -licm -loop-unswitch -disable-output
|
||||
|
||||
define i32 @main(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
br label %bb
|
||||
|
||||
bb: ; preds = %bb56, %entry
|
||||
br label %bb7
|
||||
|
||||
bb7: ; preds = %bb7, %bb
|
||||
%tmp39 = load <4 x float>, <4 x float>* null ; <<4 x float>> [#uses=1]
|
||||
%tmp40 = fadd <4 x float> %tmp39, < float 2.000000e+00, float 3.000000e+00, float 1.000000e+00, float 0.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp43 = fadd <4 x float> %tmp40, < float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 2.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp46 = fadd <4 x float> %tmp43, < float 3.000000e+00, float 0.000000e+00, float 2.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp49 = fadd <4 x float> %tmp46, < float 0.000000e+00, float 4.000000e+00, float 6.000000e+00, float 1.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
store <4 x float> %tmp49, <4 x float>* null
|
||||
br i1 false, label %bb7, label %bb56
|
||||
|
||||
bb56: ; preds = %bb7
|
||||
br i1 false, label %bb, label %bb64
|
||||
|
||||
bb64: ; preds = %bb56
|
||||
ret i32 0
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
; RUN: opt < %s -loop-rotate -licm -loop-unswitch -disable-output
|
||||
define i32 @main(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
br label %bb7
|
||||
|
||||
bb7: ; preds = %bb7, %entry
|
||||
%tmp39 = load <4 x float>, <4 x float>* null ; <<4 x float>> [#uses=1]
|
||||
%tmp40 = fadd <4 x float> %tmp39, < float 2.000000e+00, float 3.000000e+00, float 1.000000e+00, float 0.000000e+00 > ; <<4 x float>> [#uses=0]
|
||||
store <4 x float> zeroinitializer, <4 x float>* null
|
||||
br i1 false, label %bb7, label %bb56
|
||||
|
||||
bb56: ; preds = %bb7
|
||||
ret i32 0
|
||||
}
|
25
external/llvm/test/Transforms/LCSSA/basictest.ll
vendored
25
external/llvm/test/Transforms/LCSSA/basictest.ll
vendored
@ -1,25 +0,0 @@
|
||||
; RUN: opt < %s -lcssa -S | FileCheck %s
|
||||
; RUN: opt < %s -passes=lcssa -S | FileCheck %s
|
||||
|
||||
define void @lcssa(i1 %S2) {
|
||||
; CHECK-LABEL: @lcssa
|
||||
entry:
|
||||
br label %loop.interior
|
||||
loop.interior: ; preds = %post.if, %entry
|
||||
br i1 %S2, label %if.true, label %if.false
|
||||
if.true: ; preds = %loop.interior
|
||||
%X1 = add i32 0, 0 ; <i32> [#uses=1]
|
||||
br label %post.if
|
||||
if.false: ; preds = %loop.interior
|
||||
%X2 = add i32 0, 1 ; <i32> [#uses=1]
|
||||
br label %post.if
|
||||
post.if: ; preds = %if.false, %if.true
|
||||
%X3 = phi i32 [ %X1, %if.true ], [ %X2, %if.false ] ; <i32> [#uses=1]
|
||||
br i1 %S2, label %loop.exit, label %loop.interior
|
||||
loop.exit: ; preds = %post.if
|
||||
; CHECK: %X3.lcssa = phi i32
|
||||
; CHECK: %X4 = add i32 3, %X3.lcssa
|
||||
%X4 = add i32 3, %X3 ; <i32> [#uses=0]
|
||||
ret void
|
||||
}
|
||||
|
574
external/llvm/test/Transforms/LCSSA/indirectbr.ll
vendored
574
external/llvm/test/Transforms/LCSSA/indirectbr.ll
vendored
File diff suppressed because one or more lines are too long
152
external/llvm/test/Transforms/LCSSA/invoke-dest.ll
vendored
152
external/llvm/test/Transforms/LCSSA/invoke-dest.ll
vendored
@ -1,152 +0,0 @@
|
||||
; RUN: opt < %s -lcssa
|
||||
; RUN: opt < %s -passes=lcssa
|
||||
|
||||
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
|
||||
|
||||
@.str12 = external constant [3 x i8], align 1 ; <[3 x i8]*> [#uses=1]
|
||||
@.str17175 = external constant [4 x i8], align 1 ; <[4 x i8]*> [#uses=1]
|
||||
@.str21179 = external constant [12 x i8], align 1 ; <[12 x i8]*> [#uses=1]
|
||||
@.str25183 = external constant [10 x i8], align 1 ; <[10 x i8]*> [#uses=1]
|
||||
@.str32190 = external constant [92 x i8], align 1 ; <[92 x i8]*> [#uses=1]
|
||||
@.str41 = external constant [25 x i8], align 1 ; <[25 x i8]*> [#uses=1]
|
||||
|
||||
define void @_ZN8EtherBus10initializeEv() personality i32 (...)* @__gxx_personality_v0 {
|
||||
entry:
|
||||
br i1 undef, label %_ZN7cObjectnwEj.exit, label %bb.i
|
||||
|
||||
bb.i: ; preds = %entry
|
||||
br label %_ZN7cObjectnwEj.exit
|
||||
|
||||
_ZN7cObjectnwEj.exit: ; preds = %bb.i, %entry
|
||||
invoke void @_ZN7cObjectC2EPKc(i8* undef, i8* getelementptr ([12 x i8], [12 x i8]* @.str21179, i32 0, i32 0))
|
||||
to label %bb1 unwind label %lpad
|
||||
|
||||
bb1: ; preds = %_ZN7cObjectnwEj.exit
|
||||
br i1 undef, label %_ZNK5cGate4sizeEv.exit, label %bb.i110
|
||||
|
||||
bb.i110: ; preds = %bb1
|
||||
br label %_ZNK5cGate4sizeEv.exit
|
||||
|
||||
_ZNK5cGate4sizeEv.exit: ; preds = %bb.i110, %bb1
|
||||
br i1 undef, label %_ZNK5cGate4sizeEv.exit122, label %bb.i120
|
||||
|
||||
bb.i120: ; preds = %_ZNK5cGate4sizeEv.exit
|
||||
br label %_ZNK5cGate4sizeEv.exit122
|
||||
|
||||
_ZNK5cGate4sizeEv.exit122: ; preds = %bb.i120, %_ZNK5cGate4sizeEv.exit
|
||||
br i1 undef, label %bb8, label %bb2
|
||||
|
||||
bb2: ; preds = %_ZNK5cGate4sizeEv.exit122
|
||||
unreachable
|
||||
|
||||
bb8: ; preds = %_ZNK5cGate4sizeEv.exit122
|
||||
%tmp = invoke i8* @_ZN7cModule3parEPKc(i8* undef, i8* getelementptr ([10 x i8], [10 x i8]* @.str25183, i32 0, i32 0))
|
||||
to label %invcont9 unwind label %lpad119 ; <i8*> [#uses=1]
|
||||
|
||||
invcont9: ; preds = %bb8
|
||||
%tmp1 = invoke i8* @_ZN4cPar11stringValueEv(i8* %tmp)
|
||||
to label %invcont10 unwind label %lpad119 ; <i8*> [#uses=1]
|
||||
|
||||
invcont10: ; preds = %invcont9
|
||||
invoke void @_ZN8EtherBus8tokenizeEPKcRSt6vectorIdSaIdEE(i8* null, i8* %tmp1, i8* undef)
|
||||
to label %invcont11 unwind label %lpad119
|
||||
|
||||
invcont11: ; preds = %invcont10
|
||||
br i1 undef, label %bb12, label %bb18
|
||||
|
||||
bb12: ; preds = %invcont11
|
||||
invoke void (i8*, i8*, ...) @_ZN6cEnvir6printfEPKcz(i8* null, i8* getelementptr ([3 x i8], [3 x i8]* @.str12, i32 0, i32 0), i32 undef)
|
||||
to label %bb.i.i159 unwind label %lpad119
|
||||
|
||||
bb.i.i159: ; preds = %bb12
|
||||
unreachable
|
||||
|
||||
bb18: ; preds = %invcont11
|
||||
br i1 undef, label %bb32, label %bb34
|
||||
|
||||
bb32: ; preds = %bb18
|
||||
br i1 undef, label %bb.i.i123, label %bb34
|
||||
|
||||
bb.i.i123: ; preds = %bb32
|
||||
br label %bb34
|
||||
|
||||
bb34: ; preds = %bb.i.i123, %bb32, %bb18
|
||||
%tmp2 = invoke i8* @_Znaj(i32 undef)
|
||||
to label %invcont35 unwind label %lpad119 ; <i8*> [#uses=0]
|
||||
|
||||
invcont35: ; preds = %bb34
|
||||
br i1 undef, label %bb49, label %bb61
|
||||
|
||||
bb49: ; preds = %invcont35
|
||||
invoke void (i8*, i8*, ...) @_ZNK13cSimpleModule5errorEPKcz(i8* undef, i8* getelementptr ([92 x i8], [92 x i8]* @.str32190, i32 0, i32 0))
|
||||
to label %bb51 unwind label %lpad119
|
||||
|
||||
bb51: ; preds = %bb49
|
||||
unreachable
|
||||
|
||||
bb61: ; preds = %invcont35
|
||||
br label %bb106
|
||||
|
||||
.noexc: ; preds = %bb106
|
||||
invoke void @_ZN7cObjectC2EPKc(i8* undef, i8* getelementptr ([25 x i8], [25 x i8]* @.str41, i32 0, i32 0))
|
||||
to label %bb102 unwind label %lpad123
|
||||
|
||||
bb102: ; preds = %.noexc
|
||||
invoke void undef(i8* undef, i8 zeroext 1)
|
||||
to label %invcont103 unwind label %lpad119
|
||||
|
||||
invcont103: ; preds = %bb102
|
||||
invoke void undef(i8* undef, double 1.000000e+07)
|
||||
to label %invcont104 unwind label %lpad119
|
||||
|
||||
invcont104: ; preds = %invcont103
|
||||
%tmp3 = invoke i32 @_ZN13cSimpleModule11sendDelayedEP8cMessagedPKci(i8* undef, i8* undef, double 0.000000e+00, i8* getelementptr ([4 x i8], [4 x i8]* @.str17175, i32 0, i32 0), i32 undef)
|
||||
to label %invcont105 unwind label %lpad119 ; <i32> [#uses=0]
|
||||
|
||||
invcont105: ; preds = %invcont104
|
||||
br label %bb106
|
||||
|
||||
bb106: ; preds = %invcont105, %bb61
|
||||
%tmp4 = invoke i8* @_Znaj(i32 124)
|
||||
to label %.noexc unwind label %lpad119 ; <i8*> [#uses=1]
|
||||
|
||||
lpad: ; preds = %_ZN7cObjectnwEj.exit
|
||||
%exn = landingpad {i8*, i32}
|
||||
cleanup
|
||||
br label %Unwind
|
||||
|
||||
lpad119: ; preds = %bb106, %invcont104, %invcont103, %bb102, %bb49, %bb34, %bb12, %invcont10, %invcont9, %bb8
|
||||
%exn119 = landingpad {i8*, i32}
|
||||
cleanup
|
||||
unreachable
|
||||
|
||||
lpad123: ; preds = %.noexc
|
||||
%exn123 = landingpad {i8*, i32}
|
||||
cleanup
|
||||
%tmp5 = icmp eq i8* %tmp4, null ; <i1> [#uses=1]
|
||||
br i1 %tmp5, label %Unwind, label %bb.i2
|
||||
|
||||
bb.i2: ; preds = %lpad123
|
||||
br label %Unwind
|
||||
|
||||
Unwind: ; preds = %bb.i2, %lpad123, %lpad
|
||||
unreachable
|
||||
}
|
||||
|
||||
declare i32 @__gxx_personality_v0(...)
|
||||
|
||||
declare void @_ZN8EtherBus8tokenizeEPKcRSt6vectorIdSaIdEE(i8* nocapture, i8*, i8*)
|
||||
|
||||
declare i8* @_Znaj(i32)
|
||||
|
||||
declare void @_ZN6cEnvir6printfEPKcz(i8* nocapture, i8* nocapture, ...)
|
||||
|
||||
declare void @_ZNK13cSimpleModule5errorEPKcz(i8* nocapture, i8* nocapture, ...) noreturn
|
||||
|
||||
declare i8* @_ZN7cModule3parEPKc(i8*, i8*)
|
||||
|
||||
declare i32 @_ZN13cSimpleModule11sendDelayedEP8cMessagedPKci(i8*, i8*, double, i8*, i32)
|
||||
|
||||
declare void @_ZN7cObjectC2EPKc(i8*, i8*)
|
||||
|
||||
declare i8* @_ZN4cPar11stringValueEv(i8*)
|
@ -1,96 +0,0 @@
|
||||
; RUN: opt -lcssa -S < %s | FileCheck %s
|
||||
; RUN: opt -passes=lcssa -S < %s | FileCheck %s
|
||||
|
||||
; This test is based on the following C++ code:
|
||||
;
|
||||
; void f()
|
||||
; {
|
||||
; for (int i=0; i<12; i++) {
|
||||
; try {
|
||||
; if (i==3)
|
||||
; throw i;
|
||||
; } catch (int) {
|
||||
; continue;
|
||||
; } catch (...) { }
|
||||
; if (i==3) break;
|
||||
; }
|
||||
; }
|
||||
;
|
||||
; The loop info analysis identifies the catch pad for the second catch as being
|
||||
; outside the loop (because it returns to %for.end) but the associated
|
||||
; catchswitch block is identified as being inside the loop. Because of this
|
||||
; analysis, the LCSSA pass wants to create a PHI node in the catchpad block
|
||||
; for the catchswitch value, but this is a token, so it can't.
|
||||
|
||||
define void @f() personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
|
||||
entry:
|
||||
%tmp = alloca i32, align 4
|
||||
%i7 = alloca i32, align 4
|
||||
br label %for.cond
|
||||
|
||||
for.cond: ; preds = %for.inc, %entry
|
||||
%i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
|
||||
%cmp = icmp slt i32 %i.0, 12
|
||||
br i1 %cmp, label %for.body, label %for.end
|
||||
|
||||
for.body: ; preds = %for.cond
|
||||
%cond = icmp eq i32 %i.0, 3
|
||||
br i1 %cond, label %if.then, label %for.inc
|
||||
|
||||
if.then: ; preds = %for.body
|
||||
store i32 %i.0, i32* %tmp, align 4
|
||||
%tmp1 = bitcast i32* %tmp to i8*
|
||||
invoke void @_CxxThrowException(i8* %tmp1, %eh.ThrowInfo* nonnull @_TI1H) #1
|
||||
to label %unreachable unwind label %catch.dispatch
|
||||
|
||||
catch.dispatch: ; preds = %if.then
|
||||
%tmp2 = catchswitch within none [label %catch, label %catch2] unwind to caller
|
||||
|
||||
catch: ; preds = %catch.dispatch
|
||||
%tmp3 = catchpad within %tmp2 [%rtti.TypeDescriptor2* @"\01??_R0H@8", i32 0, i32* %i7]
|
||||
catchret from %tmp3 to label %for.inc
|
||||
|
||||
catch2: ; preds = %catch.dispatch
|
||||
%tmp4 = catchpad within %tmp2 [i8* null, i32 64, i8* null]
|
||||
catchret from %tmp4 to label %for.end
|
||||
|
||||
for.inc: ; preds = %catch, %for.body
|
||||
%inc = add nsw i32 %i.0, 1
|
||||
br label %for.cond
|
||||
|
||||
for.end: ; preds = %catch2, %for.cond
|
||||
ret void
|
||||
|
||||
unreachable: ; preds = %if.then
|
||||
unreachable
|
||||
}
|
||||
|
||||
; CHECK-LABEL: define void @f()
|
||||
; CHECK: catch2:
|
||||
; CHECK-NOT: phi
|
||||
; CHECK: %tmp4 = catchpad within %tmp2
|
||||
; CHECK: catchret from %tmp4 to label %for.end
|
||||
|
||||
%rtti.TypeDescriptor2 = type { i8**, i8*, [3 x i8] }
|
||||
%eh.CatchableType = type { i32, i32, i32, i32, i32, i32, i32 }
|
||||
%eh.CatchableTypeArray.1 = type { i32, [1 x i32] }
|
||||
%eh.ThrowInfo = type { i32, i32, i32, i32 }
|
||||
|
||||
$"\01??_R0H@8" = comdat any
|
||||
|
||||
$"_CT??_R0H@84" = comdat any
|
||||
|
||||
$_CTA1H = comdat any
|
||||
|
||||
$_TI1H = comdat any
|
||||
|
||||
@"\01??_7type_info@@6B@" = external constant i8*
|
||||
@"\01??_R0H@8" = linkonce_odr global %rtti.TypeDescriptor2 { i8** @"\01??_7type_info@@6B@", i8* null, [3 x i8] c".H\00" }, comdat
|
||||
@__ImageBase = external constant i8
|
||||
@"_CT??_R0H@84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor2* @"\01??_R0H@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 -1, i32 0, i32 4, i32 0 }, section ".xdata", comdat
|
||||
@_CTA1H = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%eh.CatchableType* @"_CT??_R0H@84" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32)] }, section ".xdata", comdat
|
||||
@_TI1H = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%eh.CatchableTypeArray.1* @_CTA1H to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, section ".xdata", comdat
|
||||
|
||||
declare void @_CxxThrowException(i8*, %eh.ThrowInfo*)
|
||||
|
||||
declare i32 @__CxxFrameHandler3(...)
|
87
external/llvm/test/Transforms/LCSSA/pr28424.ll
vendored
87
external/llvm/test/Transforms/LCSSA/pr28424.ll
vendored
@ -1,87 +0,0 @@
|
||||
; RUN: opt < %s -lcssa -S -o - | FileCheck %s
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
; PR28424
|
||||
; Here LCSSA adds phi-nodes for %x into the loop exits. Then, SSAUpdater needs
|
||||
; to insert phi-nodes to merge these values. That creates a new def, which in
|
||||
; its turn needs another LCCSA phi-node, and this test ensures that we insert
|
||||
; it.
|
||||
|
||||
; CHECK-LABEL: @foo1
|
||||
define internal i32 @foo1() {
|
||||
entry:
|
||||
br label %header
|
||||
|
||||
header:
|
||||
%x = add i32 0, 1
|
||||
br i1 undef, label %if, label %loopexit1
|
||||
|
||||
if:
|
||||
br i1 undef, label %latch, label %loopexit2
|
||||
|
||||
latch:
|
||||
br i1 undef, label %header, label %loopexit3
|
||||
|
||||
; CHECK: loopexit1:
|
||||
; CHECK: %x.lcssa = phi i32 [ %x, %header ]
|
||||
loopexit1:
|
||||
br label %loop_with_insert_point
|
||||
|
||||
; CHECK: loopexit2:
|
||||
; CHECK: %x.lcssa1 = phi i32 [ %x, %if ]
|
||||
loopexit2:
|
||||
br label %exit
|
||||
|
||||
; CHECK: loopexit3:
|
||||
; CHECK: %x.lcssa2 = phi i32 [ %x, %latch ]
|
||||
loopexit3:
|
||||
br label %loop_with_insert_point
|
||||
|
||||
; CHECK: loop_with_insert_point:
|
||||
; CHECK: %x4 = phi i32 [ %x4, %loop_with_insert_point ], [ %x.lcssa2, %loopexit3 ], [ %x.lcssa, %loopexit1 ]
|
||||
loop_with_insert_point:
|
||||
br i1 undef, label %loop_with_insert_point, label %bb
|
||||
|
||||
; CHECK: bb:
|
||||
; CHECK: %x4.lcssa = phi i32 [ %x4, %loop_with_insert_point ]
|
||||
bb:
|
||||
br label %exit
|
||||
|
||||
; CHECK: exit:
|
||||
; CHECK: %x3 = phi i32 [ %x4.lcssa, %bb ], [ %x.lcssa1, %loopexit2 ]
|
||||
exit:
|
||||
ret i32 %x
|
||||
}
|
||||
|
||||
; CHECK-LABEL: @foo2
|
||||
define internal i32 @foo2() {
|
||||
entry:
|
||||
br label %header
|
||||
|
||||
header:
|
||||
%x = add i32 0, 1
|
||||
br i1 undef, label %latch, label %loopexit1
|
||||
|
||||
latch:
|
||||
br i1 undef, label %header, label %loopexit2
|
||||
|
||||
; CHECK: loopexit1:
|
||||
; CHECK: %x.lcssa = phi i32 [ %x, %header ]
|
||||
loopexit1:
|
||||
br label %loop_with_insert_point
|
||||
|
||||
; CHECK: loopexit2:
|
||||
; CHECK: %x.lcssa1 = phi i32 [ %x, %latch ]
|
||||
loopexit2:
|
||||
br label %loop_with_insert_point
|
||||
|
||||
; CHECK: loop_with_insert_point:
|
||||
; CHECK: %x2 = phi i32 [ %x2, %loop_with_insert_point ], [ %x.lcssa1, %loopexit2 ], [ %x.lcssa, %loopexit1 ]
|
||||
loop_with_insert_point:
|
||||
br i1 undef, label %loop_with_insert_point, label %exit
|
||||
|
||||
; CHECK: exit:
|
||||
; CHECK: %x2.lcssa = phi i32 [ %x2, %loop_with_insert_point ]
|
||||
exit:
|
||||
ret i32 %x
|
||||
}
|
35
external/llvm/test/Transforms/LCSSA/pr28608.ll
vendored
35
external/llvm/test/Transforms/LCSSA/pr28608.ll
vendored
@ -1,35 +0,0 @@
|
||||
; RUN: opt < %s -lcssa -disable-output
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
; PR28608
|
||||
; Check that we don't crash on this test.
|
||||
|
||||
define void @foo() {
|
||||
entry:
|
||||
br label %bb1
|
||||
|
||||
bb1:
|
||||
br label %bb2
|
||||
|
||||
bb2:
|
||||
%x = phi i32 [ undef, %bb5 ], [ undef, %bb1 ]
|
||||
br i1 undef, label %bb3, label %bb6
|
||||
|
||||
bb3:
|
||||
br i1 undef, label %bb5, label %bb4
|
||||
|
||||
bb4:
|
||||
br label %bb6
|
||||
|
||||
bb5:
|
||||
br label %bb2
|
||||
|
||||
bb6:
|
||||
br label %bb1
|
||||
|
||||
exit:
|
||||
%y = add i32 0, %x
|
||||
ret void
|
||||
}
|
||||
|
@ -1,29 +0,0 @@
|
||||
; RUN: opt < %s -lcssa -S -verify-loop-info | FileCheck %s
|
||||
; PR6546
|
||||
|
||||
; LCSSA doesn't need to transform uses in blocks not reachable
|
||||
; from the entry block.
|
||||
|
||||
; CHECK: %tmp33 = load i1*, i1** %tmp
|
||||
|
||||
define fastcc void @dfs() nounwind {
|
||||
bb:
|
||||
br label %bb44
|
||||
|
||||
bb44:
|
||||
br i1 undef, label %bb7, label %bb45
|
||||
|
||||
bb7:
|
||||
%tmp = bitcast i1** undef to i1**
|
||||
br label %bb15
|
||||
|
||||
bb15:
|
||||
br label %bb44
|
||||
|
||||
bb32:
|
||||
%tmp33 = load i1*, i1** %tmp, align 8
|
||||
br label %bb45
|
||||
|
||||
bb45:
|
||||
unreachable
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
; RUN: opt < %s -lcssa -S | FileCheck %s
|
||||
; RUN: opt < %s -passes=lcssa -S | FileCheck %s
|
||||
; CHECK: exit1:
|
||||
; CHECK: .lcssa =
|
||||
; CHECK: exit2:
|
||||
; CHECK: .lcssa1 =
|
||||
; CHECK: exit3:
|
||||
; CHECK-NOT: .lcssa
|
||||
|
||||
; Test to ensure that when there are multiple exit blocks, PHI nodes are
|
||||
; only inserted by LCSSA when there is a use dominated by a given exit
|
||||
; block.
|
||||
|
||||
declare void @printf(i32 %i)
|
||||
|
||||
define i32 @unused_phis() nounwind {
|
||||
entry:
|
||||
br label %loop
|
||||
|
||||
loop:
|
||||
%i = phi i32 [0, %entry], [1, %then2]
|
||||
br i1 undef, label %exit1, label %then1
|
||||
|
||||
then1:
|
||||
br i1 undef, label %exit2, label %then2
|
||||
|
||||
then2:
|
||||
br i1 undef, label %exit3, label %loop
|
||||
|
||||
exit1:
|
||||
call void @printf(i32 %i)
|
||||
ret i32 %i
|
||||
|
||||
exit2:
|
||||
ret i32 %i
|
||||
|
||||
exit3:
|
||||
ret i32 0
|
||||
}
|
Reference in New Issue
Block a user