• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=armv7-none-eabi -mattr=-neon,-vfp2sp %s -o - | FileCheck %s  -check-prefixes=COMMON,NOVFP
2; RUN: llc -mtriple=armv7-none-eabi -mattr=+neon %s -float-abi=hard -o - | FileCheck %s -check-prefixes=COMMON,VFP
3
4; The intent here is to test "X", which says that any operand whatsoever is allowed.
5; Using this mechanism, we want to test toggling allocating GPR or SPR registers
6; depending on whether the float registers are available. Thus, the mnemonic is
7; totally irrelevant here, which is why we use FOO and also comment it out using "@"
8; to avoid assembler errors.
9
10; Note that this kind of IR can be generated by a function such as:
11;  void f1(float f) {asm volatile ("@FOO $0, $0" : : "X" (f));}
12
13define arm_aapcs_vfpcc void @func(float %f) {
14; COMMON-LABEL: func
15; NOVFP:        FOO r0, r0
16; VFP:          FOO s0, s0
17entry:
18  call void asm sideeffect "@FOO $0, $0", "X" (float %f) nounwind
19  ret void
20}
21