1; RUN: llc -march=x86 -asm-verbose=false < %s | FileCheck %s
2
3; Check that merging switch cases that differ in one bit works.
4; CHECK-LABEL: test1
5; CHECK: orl $2
6; CHECK-NEXT: cmpl $6
7
8define void @test1(i32 %variable) nounwind {
9entry:
10  switch i32 %variable, label %if.end [
11    i32 4, label %if.then
12    i32 6, label %if.then
13  ]
14
15if.then:
16  %call = tail call i32 (...) @bar() nounwind
17  ret void
18
19if.end:
20  ret void
21}
22
23; CHECK-LABEL: test2
24; CHECK: orl $-2147483648
25; CHECK-NEXT: cmpl $-2147483648
26define void @test2(i32 %variable) nounwind {
27entry:
28  switch i32 %variable, label %if.end [
29    i32 0, label %if.then
30    i32 -2147483648, label %if.then
31  ]
32
33if.then:
34  %call = tail call i32 (...) @bar() nounwind
35  ret void
36
37if.end:
38  ret void
39}
40
41declare i32 @bar(...) nounwind
42