mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fix 12513: Loop unrolling breaks with indirect branches.
Take this opportunity to generalize the indirectbr bailout logic for loop transformations. CFG transformations will never get indirectbr right, and there's no point trying. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
; RUN: opt -loop-unswitch -disable-output -stats -info-output-file - < %s | FileCheck --check-prefix=STATS %s
|
||||
; RUN: opt -S -loop-unswitch -verify-loop-info -verify-dom-info %s | FileCheck %s
|
||||
|
||||
; STATS: 1 loop-unswitch - Total number of instructions analyzed
|
||||
; RUN: opt < %s -S -loop-unswitch -verify-loop-info -verify-dom-info | FileCheck %s
|
||||
; PR12343: -loop-unswitch crash on indirect branch
|
||||
|
||||
; CHECK: %0 = icmp eq i64 undef, 0
|
||||
; CHECK-NEXT: br i1 %0, label %"5", label %"4"
|
||||
|
||||
; CHECK: "5": ; preds = %entry
|
||||
; CHECK-NEXT: br label %"5.split"
|
||||
|
||||
; CHECK: "5.split": ; preds = %"5"
|
||||
; CHECK-NEXT: br label %"16"
|
||||
|
||||
; CHECK: "16": ; preds = %"22", %"5.split"
|
||||
; CHECK: "16": ; preds = %"22", %"5"
|
||||
; CHECK-NEXT: indirectbr i8* undef, [label %"22", label %"33"]
|
||||
|
||||
; CHECK: "22": ; preds = %"16"
|
||||
|
Reference in New Issue
Block a user