[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ARM / thumb_func-implies-thumb.s
blob342cc4a5f0b51f9d77163fb7cdd324aadbf9cd4f
1 @ RUN: llvm-mc -triple=armv7-darwin- -show-encoding < %s | FileCheck %s
2 .syntax unified
4 .text
6 .arm
7 @ Ensure the plain form switches mode.
8 .thumb_func
9 @ CHECK: .code 16
10 @ CHECK-LABEL: foo
11 foo:
12 bx lr
14 .arm
15 @ Ensure the labeled form doesn't switch mode.
16 .thumb_func bar
17 @ CHECK-NOT: .code 16
18 @ CHECK-LABEL: bar
19 bar:
20 bx lr
22 .arm
23 @ Ensure the nop is assembled in thumb mode, even though the baz symbol is
24 @ defined later.
25 .thumb_func
26 nop
27 @ CHECK: .code 16
28 @ CHECK-NEXT: nop
29 @ CHECK-LABEL: baz
30 baz:
31 bx lr