reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
; RUN: llc -verify-machineinstrs < %s
;
; The lowering of a switch combined with constand folding would leave spurious extra arguments on a PHI instruction.
;
target triple = "x86_64-apple-darwin10"

define void @foo() {
  br label %cond_true813.i

cond_true813.i:                                   ; preds = %0
  br i1 false, label %cond_true818.i, label %cond_next1146.i

cond_true818.i:                                   ; preds = %cond_true813.i
  br i1 false, label %recog_memoized.exit52, label %cond_next1146.i

recog_memoized.exit52:                            ; preds = %cond_true818.i
  switch i32 0, label %bb886.i.preheader [
    i32 0, label %bb907.i
    i32 44, label %bb866.i
    i32 103, label %bb874.i
    i32 114, label %bb874.i
  ]

bb857.i:                                          ; preds = %bb886.i, %bb866.i
  %tmp862.i494.24 = phi i8* [ null, %bb866.i ], [ %tmp862.i494.26, %bb886.i ] ; <i8*> [#uses=1]
  switch i32 0, label %bb886.i.preheader [
    i32 0, label %bb907.i
    i32 44, label %bb866.i
    i32 103, label %bb874.i
    i32 114, label %bb874.i
  ]

bb866.i.loopexit:                                 ; preds = %bb874.i
  br label %bb866.i

bb866.i.loopexit31:                               ; preds = %cond_true903.i
  br label %bb866.i

bb866.i:                                          ; preds = %bb866.i.loopexit31, %bb866.i.loopexit, %bb857.i, %recog_memoized.exit52
  br i1 false, label %bb907.i, label %bb857.i

bb874.i.preheader.loopexit:                       ; preds = %cond_true903.i, %cond_true903.i
  ret void

bb874.i:                                          ; preds = %bb857.i, %bb857.i, %recog_memoized.exit52, %recog_memoized.exit52
  switch i32 0, label %bb886.i.preheader.loopexit [
    i32 0, label %bb907.i
    i32 44, label %bb866.i.loopexit
    i32 103, label %bb874.i.backedge
    i32 114, label %bb874.i.backedge
  ]

bb874.i.backedge:                                 ; preds = %bb874.i, %bb874.i
  ret void

bb886.i.preheader.loopexit:                       ; preds = %bb874.i
  ret void

bb886.i.preheader:                                ; preds = %bb857.i, %recog_memoized.exit52
  %tmp862.i494.26 = phi i8* [ undef, %recog_memoized.exit52 ], [ %tmp862.i494.24, %bb857.i ] ; <i8*> [#uses=1]
  br label %bb886.i

bb886.i:                                          ; preds = %cond_true903.i, %bb886.i.preheader
  br i1 false, label %bb857.i, label %cond_true903.i

cond_true903.i:                                   ; preds = %bb886.i
  switch i32 0, label %bb886.i [
    i32 0, label %bb907.i
    i32 44, label %bb866.i.loopexit31
    i32 103, label %bb874.i.preheader.loopexit
    i32 114, label %bb874.i.preheader.loopexit
  ]

bb907.i:                                          ; preds = %cond_true903.i, %bb874.i, %bb866.i, %bb857.i, %recog_memoized.exit52
  br i1 false, label %cond_next1146.i, label %cond_true910.i

cond_true910.i:                                   ; preds = %bb907.i
  ret void

cond_next1146.i:                                  ; preds = %bb907.i, %cond_true818.i, %cond_true813.i
  ret void

bb2060.i:                                         ; No predecessors!
  br i1 false, label %cond_true2064.i, label %bb2067.i

cond_true2064.i:                                  ; preds = %bb2060.i
  unreachable

bb2067.i:                                         ; preds = %bb2060.i
  ret void

cond_next3473:                                    ; No predecessors!
  ret void

cond_next3521:                                    ; No predecessors!
  ret void
}