mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
243b5516a7
There is no suitable basic block to sink instructions in loops without exits. The only way an instruction in a loop without exits can be used is as an incoming value to a PHI. In such cases, the incoming block for the corresponding value is unreachable. This fixes PR24013. Differential Revision: http://reviews.llvm.org/D10903 llvm-svn: 241987
20 lines
545 B
LLVM
20 lines
545 B
LLVM
; RUN: opt -licm -S < %s | FileCheck %s
|
|
|
|
define void @f(i1 zeroext %p1) {
|
|
; CHECK-LABEL: @f(
|
|
entry:
|
|
br label %lbl
|
|
|
|
lbl.loopexit: ; No predecessors!
|
|
br label %lbl
|
|
|
|
lbl: ; preds = %lbl.loopexit, %entry
|
|
%phi = phi i32 [ %conv, %lbl.loopexit ], [ undef, %entry ]
|
|
; CHECK: phi i32 [ undef, {{.*}} ], [ undef
|
|
br label %if.then.5
|
|
|
|
if.then.5: ; preds = %if.then.5, %lbl
|
|
%conv = zext i1 undef to i32
|
|
br label %if.then.5
|
|
}
|