Home | History | Annotate | Download | only in X86
      1 ; RUN: llc -mtriple=x86_64-linux-gnu %s -o - -verify-machineinstrs | FileCheck %s
      2 
      3 define i32 @tail_merge_unreachable(i32 %i) {
      4 entry:
      5   br i1 undef, label %sw, label %end
      6 sw:
      7   switch i32 %i, label %end [
      8     i32 99,  label %sw.bb
      9     i32 98,  label %sw.bb
     10     i32 101, label %sw.bb
     11     i32 97,  label %sw.bb2
     12     i32 96,  label %sw.bb2
     13     i32 100, label %sw.bb2
     14   ]
     15 sw.bb:
     16   unreachable
     17 sw.bb2:
     18   unreachable
     19 end:
     20   %p = phi i32 [ 1, %sw ], [ 0, %entry ]
     21   ret i32 %p
     22 
     23 ; CHECK-LABEL: tail_merge_unreachable:
     24 ; Range Check
     25 ; CHECK: addl $-96
     26 ; CHECK: cmpl $5
     27 ; CHECK: jbe [[JUMP_TABLE_BLOCK:[.][A-Za-z0-9_]+]]
     28 ; CHECK: retq
     29 ; CHECK: [[JUMP_TABLE_BLOCK]]:
     30 ; CHECK: btl
     31 ; CHECK: jae [[UNREACHABLE_BLOCK:[.][A-Za-z0-9_]+]]
     32 ; CHECK [[UNREACHABLE_BLOCK]]:
     33 ; CHECK: .Lfunc_end0
     34 }
     35