diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/switch-jump-table.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/switch-jump-table.ll | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/X86/switch-jump-table.ll b/llvm/test/CodeGen/X86/switch-jump-table.ll index 1e1f7c5cef0..4c7937078e8 100644 --- a/llvm/test/CodeGen/X86/switch-jump-table.ll +++ b/llvm/test/CodeGen/X86/switch-jump-table.ll @@ -2,14 +2,12 @@ ; RUN: llc -mtriple=i686-pc-gnu-linux -print-machineinstrs=expand-isel-pseudos %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=CHECK-JT-PROB -; An unreachable default destination is replaced with the most popular case label. +; An unreachable default destination is ignored and no compare and branch +; is generated for the default values. define void @foo(i32 %x, i32* %to) { ; CHECK-LABEL: foo: ; CHECK: movl 4(%esp), [[REG:%e[a-z]{2}]] -; CHECK: cmpl $3, [[REG]] -; CHECK: ja .LBB0_6 -; CHECK-NEXT: # %bb.1: ; CHECK-NEXT: jmpl *.LJTI0_0(,[[REG]],4) ; CHECK: movl $4 ; CHECK: retl @@ -45,10 +43,12 @@ default: ; The jump table has four entries. ; CHECK-LABEL: .LJTI0_0: +; CHECK-NEXT: .long .LBB0_1 ; CHECK-NEXT: .long .LBB0_2 ; CHECK-NEXT: .long .LBB0_3 ; CHECK-NEXT: .long .LBB0_4 ; CHECK-NEXT: .long .LBB0_5 +; CHECK-NEXT: .long .LBB0_5 } ; Check if branch probabilities are correctly assigned to the jump table. |