74 lines · plain
1# RUN: not llc -mtriple=x86_64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s2 3--- |4 5 define i32 @test_jumptable(i32 %in) {6 entry:7 switch i32 %in, label %def [8 i32 0, label %lbl19 i32 1, label %lbl210 i32 2, label %lbl311 i32 3, label %lbl412 ]13 14 def:15 ret i32 016 17 lbl1:18 ret i32 119 20 lbl2:21 ret i32 222 23 lbl3:24 ret i32 425 26 lbl4:27 ret i32 828 }29 30...31---32name: test_jumptable33jumpTable:34 kind: label-difference3235 entries:36 - id: 037 blocks: [ '%bb.3.lbl1', '%bb.4.lbl2', '%bb.5.lbl3', '%bb.6.lbl4' ]38body: |39 bb.0.entry:40 successors: %bb.2.def, %bb.1.entry41 42 $eax = MOV32rr $edi, implicit-def $rax43 CMP32ri8 $edi, 3, implicit-def $eflags44 JCC_1 %bb.2.def, 7, implicit $eflags45 46 bb.1.entry:47 successors: %bb.3.lbl1, %bb.4.lbl2, %bb.5.lbl3, %bb.6.lbl448 ; CHECK: [[@LINE+1]]:31: use of undefined jump table '%jump-table.2'49 $rcx = LEA64r $rip, 1, _, %jump-table.2, _50 $rax = MOVSX64rm32 $rcx, 4, $rax, 0, _51 $rax = ADD64rr $rax, $rcx, implicit-def $eflags52 JMP64r $rax53 54 bb.2.def:55 $eax = MOV32r0 implicit-def $eflags56 RET64 $eax57 58 bb.3.lbl1:59 $eax = MOV32ri 160 RET64 $eax61 62 bb.4.lbl2:63 $eax = MOV32ri 264 RET64 $eax65 66 bb.5.lbl3:67 $eax = MOV32ri 468 RET64 $eax69 70 bb.6.lbl4:71 $eax = MOV32ri 872 RET64 $eax73...74