mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
a1b821fac9
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241987 91177308-0d34-0410-b5e6-96231b3b80d8
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
|
|
}
|