Switch lowering: extract jump tables and bit tests before building binary tree (PR22262)
[oota-llvm.git] / test / CodeGen / X86 / pr7882.ll
1 ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin -pre-RA-sched=fast \
2 ; RUN: | FileCheck %s
3 ; make sure scheduler honors the flags clobber.  PR 7882.
4
5 define i32 @main(i32 %argc, i8** %argv) nounwind
6 {
7 entry:
8 ; CHECK: InlineAsm End
9 ; CHECK: cmpl
10     %res = icmp slt i32 1, %argc
11     %tmp = call i32 asm sideeffect alignstack
12         "push $$0
13          popf
14          mov $$13, $0", "=r,r,~{memory},~{flags}" (i1 %res)
15     %ret = select i1 %res, i32 %tmp, i32 42
16     ret i32 %ret
17 }