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
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=x86_64-pc-linux-gnu -tail-merge-threshold 2 < %s | FileCheck %s

; Test that we still do some merging if a block has more than
; tail-merge-threshold predecessors.

declare void @bar()

define void @foo(i32 %xxx) nounwind {
; CHECK-LABEL: foo:
; CHECK:       # %bb.0:
; CHECK-NEXT:    pushq %rax
; CHECK-NEXT:    cmpl $3, %edi
; CHECK-NEXT:    ja .LBB0_4
; CHECK-NEXT:  # %bb.1:
; CHECK-NEXT:    movl %edi, %eax
; CHECK-NEXT:    jmpq *.LJTI0_0(,%rax,8)
; CHECK-NEXT:  .LBB0_3: # %bb3
; CHECK-NEXT:    callq bar
; CHECK-NEXT:    popq %rax
; CHECK-NEXT:    retq
; CHECK-NEXT:  .LBB0_4: # %bb4
; CHECK-NEXT:    callq bar
; CHECK-NEXT:    popq %rax
; CHECK-NEXT:    retq
  switch i32 %xxx, label %bb4 [
    i32 0, label %bb0
    i32 1, label %bb1
    i32 2, label %bb2
    i32 3, label %bb3
  ]

bb0:
  call void @bar()
  br label %bb5

bb1:
 call void @bar()
 br label %bb5

bb2:
  call void @bar()
  br label %bb5

bb3:
  call void @bar()
  br label %bb5

bb4:
  call void @bar()
  br label %bb5

bb5:
  ret void
}