mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
9af7014019
In the simple and triangle if-conversion cases, when CopyAndPredicateBlock is used because the to-be-predicated block has other predecessors, we need to explicitly remove the old copied block from the successors list. Normally if conversion relies on TII->AnalyzeBranch combined with BB->CorrectExtraCFGEdges to cleanup the successors list, but if the predicated block contained an un-analyzable branch (such as a now-predicated return), then this will fail. These extra successors were causing a problem on PPC because it was causing later passes (such as PPCEarlyReturm) to leave dead return-only basic blocks in the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179227 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
876 B
LLVM
26 lines
876 B
LLVM
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s
|
|
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
|
|
target triple = "powerpc64-unknown-linux-gnu"
|
|
|
|
define void @_Z8example3iPiS_() #0 {
|
|
entry:
|
|
br i1 undef, label %while.end, label %while.body.lr.ph
|
|
|
|
while.body.lr.ph: ; preds = %entry
|
|
br i1 undef, label %while.end, label %while.body
|
|
|
|
while.body: ; preds = %while.body, %while.body.lr.ph
|
|
br i1 false, label %while.end, label %while.body, !llvm.vectorizer.already_vectorized !0
|
|
|
|
while.end: ; preds = %while.body, %while.body.lr.ph, %entry
|
|
ret void
|
|
|
|
; CHECK: @_Z8example3iPiS_
|
|
; CHECK: bnelr
|
|
}
|
|
|
|
attributes #0 = { noinline nounwind }
|
|
|
|
!0 = metadata !{}
|
|
|