brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · a1041f0 Raw
77 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' ]38# CHECK: [[@LINE+1]]:18: redefinition of jump table entry '%jump-table.0'39    - id:        040      blocks:    [ '%bb.3.lbl1', '%bb.4.lbl2', '%bb.5.lbl3', '%bb.6.lbl4' ]41body: |42  bb.0.entry:43    successors: %bb.2.def, %bb.1.entry44 45    $eax = MOV32rr $edi, implicit-def $rax46    CMP32ri8 $edi, 3, implicit-def $eflags47    JCC_1 %bb.2.def, 7, implicit $eflags48 49  bb.1.entry:50    successors: %bb.3.lbl1, %bb.4.lbl2, %bb.5.lbl3, %bb.6.lbl451 52    $rcx = LEA64r $rip, 1, _, %jump-table.0, _53    $rax = MOVSX64rm32 $rcx, 4, $rax, 0, _54    $rax = ADD64rr $rax, $rcx, implicit-def $eflags55    JMP64r $rax56 57  bb.2.def:58    $eax = MOV32r0 implicit-def $eflags59    RET64 $eax60 61  bb.3.lbl1:62    $eax = MOV32ri 163    RET64 $eax64 65  bb.4.lbl2:66    $eax = MOV32ri 267    RET64 $eax68 69  bb.5.lbl3:70    $eax = MOV32ri 471    RET64 $eax72 73  bb.6.lbl4:74    $eax = MOV32ri 875    RET64 $eax76...77