Switch lowering: extract jump tables and bit tests before building binary tree (PR22262)
[oota-llvm.git] / test / MC / ARM / thumb_rewrites.s
1 @ RUN: llvm-mc -triple thumbv6m -show-encoding < %s | FileCheck %s
2
3     adds    r0, r0, #8
4 @ CHECK: adds   r0, #8              @ encoding: [0x08,0x30]
5
6     adds    r0, r0, r0
7 @ CHECK: adds   r0, r0, r0          @ encoding: [0x00,0x18]
8
9     add     r0, r0, r8
10 @ CHECK: add    r0, r8              @ encoding: [0x40,0x44]
11
12     add     sp, sp, r0
13 @ CHECK: add    sp, r0              @ encoding: [0x85,0x44]
14
15     add     r0, r0, r1
16 @ CHECK: add    r0, r1              @ encoding: [0x08,0x44]
17
18     add     r2, r2, r3
19 @ CHECK: add    r2, r3              @ encoding: [0x1a,0x44]
20
21     subs    r0, r0, r0
22 @ CHECK: subs   r0, r0, r0          @ encoding: [0x00,0x1a]
23
24     ands    r0, r0, r1
25 @ CHECK: ands   r0, r1              @ encoding: [0x08,0x40]
26
27     eors    r0, r0, r1
28 @ CHECK: eors   r0, r1              @ encoding: [0x48,0x40]
29
30     lsls    r0, r0, r1
31 @ CHECK: lsls   r0, r1              @ encoding: [0x88,0x40]
32
33     lsrs    r0, r0, r1
34 @ CHECK: lsrs   r0, r1              @ encoding: [0xc8,0x40]
35
36     asrs    r0, r0, r1
37 @ CHECK: asrs   r0, r1              @ encoding: [0x08,0x41]
38
39     adcs    r0, r0, r1
40 @ CHECK: adcs   r0, r1              @ encoding: [0x48,0x41]
41
42     sbcs    r0, r0, r1
43 @ CHECK: sbcs   r0, r1              @ encoding: [0x88,0x41]
44
45     rors    r0, r0, r1
46 @ CHECK: rors   r0, r1              @ encoding: [0xc8,0x41]
47
48     orrs    r0, r0, r1
49 @ CHECK: orrs   r0, r1              @ encoding: [0x08,0x43]
50
51     bics    r0, r0, r1
52 @ CHECK: bics   r0, r1              @ encoding: [0x88,0x43]