1; RUN: llc -mtriple=i686-- -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
7define void @test1(i32 %variable) nounwind {
8entry:
9  switch i32 %variable, label %if.end [
10    i32 4, label %if.then
11    i32 6, label %if.then
12  ]
13
14if.then:
15  %call = tail call i32 (...) @bar() nounwind
16  ret void
17
18if.end:
19  ret void
20}
21
22; CHECK-LABEL: test2
23; CHECK: testl $2147483647
24define void @test2(i32 %variable) nounwind {
25entry:
26  switch i32 %variable, label %if.end [
27    i32 0, label %if.then
28    i32 -2147483648, label %if.then
29  ]
30
31if.then:
32  %call = tail call i32 (...) @bar() nounwind
33  ret void
34
35if.end:
36  ret void
37}
38
39declare i32 @bar(...) nounwind
40