1 ; RUN: llc -march=x86-64 -asm-verbose=false < %s | FileCheck %s
3 ; This switch should use bit tests, and the third bit test case is just
4 ; testing for one possible value, so it doesn't need a bt.
6 ; CHECK: movabsq $2305843009482129440, %r
7 ; CHECK-NEXT: btq %rax, %r
9 ; CHECK-NEXT: movl $671088640, %e
10 ; CHECK-NEXT: btq %rax, %r
12 ; CHECK-NEXT: testq %rax, %r
15 define void @test(i8* %l) nounwind {
17 %l.addr = alloca i8*, align 8 ; <i8**> [#uses=2]
18 store i8* %l, i8** %l.addr
19 %tmp = load i8** %l.addr ; <i8*> [#uses=1]
20 %tmp1 = load i8* %tmp ; <i8> [#uses=1]
21 %conv = sext i8 %tmp1 to i32 ; <i32> [#uses=1]
22 switch i32 %conv, label %sw.default [
31 sw.bb: ; preds = %entry, %entry
35 sw.bb2: ; preds = %entry, %entry, %entry
39 sw.bb4: ; preds = %entry
43 sw.default: ; preds = %entry
44 call void @foo(i32 97)
47 sw.epilog: ; preds = %sw.default, %sw.bb4, %sw.bb2, %sw.bb
51 declare void @foo(i32)