[ThinLTO] Add code comment. NFC
[llvm-complete.git] / test / MC / ARM / ldr-pseudo-cond-darwin.s
blob915b883bc755651b940622d7312b7186cca46c54
1 @RUN: llvm-mc -triple armv7-base-apple-darwin %s | FileCheck --check-prefix=CHECK-ARM --check-prefix=CHECK %s
2 @RUN: llvm-mc -triple thumbv7-base-apple-darwin %s | FileCheck --check-prefix=CHECK-THUMB2 --check-prefix=CHECK %s
5 @ Check that ldr to constant pool correctly transfers the condition codes
7 @ simple test
8 .section __TEXT,a,regular,pure_instructions
9 @ CHECK-LABEL: f0:
10 f0:
11 it eq
12 ldreq r0, =0x10002
13 @ CHECK: ldreq r0, Ltmp0
15 @ loading multiple constants
16 .section __TEXT,b,regular,pure_instructions
17 @ CHECK-LABEL: f1:
18 f1:
19 ite eq
20 ldreq r0, =0x10003
21 @ CHECK: ldreq r0, Ltmp1
22 ldrne r0, =0x10004
23 @ CHECK: ldrne r0, Ltmp2
25 @ transformation to mov
26 .section __TEXT,d,regular,pure_instructions
27 @ CHECK-LABEL: f2:
28 f2:
29 @ Can use the narrow Thumb mov as it does not set flags in an IT block
30 it eq
31 ldreq r1, =0x1
32 @ CHECK: moveq r1, #1
34 @ Must use the wide Thumb mov if the constant can't be represented
35 ite eq
36 ldreq r2, = 0x1f000000
37 @ CHECK-ARM moveq r2, #520093696
38 @ CHECK-THUMB2 moveq.w r2, #520093696
39 ldrne r3, = 0x00001234
40 @ CHECK: movwne r3, #4660
43 @ Constant Pools
45 @ CHECK: .section __TEXT,a,regular,pure_instructions
46 @ CHECK: .p2align 2
47 @ CHECK: Ltmp0:
48 @ CHECK: .long 65538
50 @ CHECK: .section __TEXT,b,regular,pure_instructions
51 @ CHECK: .p2align 2
52 @ CHECK: Ltmp1:
53 @ CHECK: .long 65539
54 @ CHECK: Ltmp2:
55 @ CHECK: .long 65540