brintos

brintos / llvm-project-archived public Read only

0
0
Text · 927 B · 2b08e6d Raw
21 lines · plain
1; RUN: llc -mtriple=armv7-none-eabi -mattr=-neon,-vfp2sp %s -o - | FileCheck %s  -check-prefixes=COMMON,NOVFP2; RUN: llc -mtriple=armv7-none-eabi -mattr=+neon %s -float-abi=hard -o - | FileCheck %s -check-prefixes=COMMON,VFP3 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 registers6; depending on whether the float registers are available. Thus, the mnemonic is7; 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: func15; NOVFP:        FOO r0, r016; VFP:          FOO s0, s017entry:18  call void asm sideeffect "@FOO $0, $0", "X" (float %f) nounwind19  ret void20}21