Add explicit -mtriple=arm-unknown to llvm/test/CodeGen/ARM/disable-tail-calls.ll...
[oota-llvm.git] / test / CodeGen / X86 / switch-or.ll
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
8 define void @test1(i32 %variable) nounwind {
9 entry:
10   switch i32 %variable, label %if.end [
11     i32 4, label %if.then
12     i32 6, label %if.then
13   ]
14
15 if.then:
16   %call = tail call i32 (...) @bar() nounwind
17   ret void
18
19 if.end:
20   ret void
21 }
22
23 ; CHECK-LABEL: test2
24 ; CHECK: orl $-2147483648
25 ; CHECK-NEXT: cmpl $-2147483648
26 define void @test2(i32 %variable) nounwind {
27 entry:
28   switch i32 %variable, label %if.end [
29     i32 0, label %if.then
30     i32 -2147483648, label %if.then
31   ]
32
33 if.then:
34   %call = tail call i32 (...) @bar() nounwind
35   ret void
36
37 if.end:
38   ret void
39 }
40
41 declare i32 @bar(...) nounwind