1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/Transforms/LICM/bisect-state.ll
Davide Italiano 8b7b8bb5e6 [LICM] Work around LICM needs to maintain state across loops.
The pass creates some state which expects to be cleaned up by
a later instance of the same pass. opt-bisect happens to expose
this not ideal design because calling skipLoop() will result in
this state not being cleaned up at times and an assertion firing
in `doFinalization()`. Chandler tells me the new pass manager will
give us options to avoid these design traps, but until it's not ready,
we need a workaround for the current pass infrastructure. Fix provided
by Andy Kaylor, see the review for a complete discussion.

Differential Revision:  https://reviews.llvm.org/D25848

llvm-svn: 290427
2016-12-23 13:12:50 +00:00

16 lines
284 B
LLVM

; Make sure we don't crash in LICM.
; RUN: opt %s -licm -opt-bisect-limit=1
define void @patatino() {
for.cond1:
br label %for.body
for.body:
br label %for.cond5
for.cond5:
br i1 true, label %if.end, label %for.end
if.end:
br label %for.cond5
for.end:
br label %for.body
}