~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/X86/switch-order-weight.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc -mtriple=x86_64-apple-darwin11 < %s | FileCheck %s
 
2
 
 
3
; Check that the cases which lead to unreachable are checked after "10"
 
4
 
 
5
define void @test1(i32 %x) nounwind uwtable ssp {
 
6
entry:
 
7
  switch i32 %x, label %if.end7 [
 
8
    i32 0, label %if.then
 
9
    i32 10, label %if.then2
 
10
    i32 20, label %if.then5
 
11
  ]
 
12
 
 
13
; CHECK-LABEL: test1:
 
14
; CHECK-NOT: unr
 
15
; CHECK: cmpl $10
 
16
; CHECK: bar
 
17
; CHECK: cmpl $20
 
18
 
 
19
if.then:
 
20
  tail call void @unr(i32 23) noreturn nounwind
 
21
  unreachable
 
22
 
 
23
if.then2:
 
24
  tail call void @bar(i32 42) nounwind
 
25
  br label %if.end7
 
26
 
 
27
if.then5:
 
28
  tail call void @unr(i32 5) noreturn nounwind
 
29
  unreachable
 
30
 
 
31
if.end7:
 
32
  ret void
 
33
}
 
34
 
 
35
declare void @unr(i32) noreturn
 
36
 
 
37
declare void @bar(i32)