1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=csky -mattr=+fpuv2_sf,+fpuv2_df,+hard-float -float-abi=hard -verify-machineinstrs -csky-no-aliases < %s \
3 ; RUN: | FileCheck -check-prefix=CSKYIFD %s
5 ; These test that we can use both the architectural names (r*) and the ABI names
6 ; (a*, l* etc) to refer to registers in inline asm constraint lists. In each
7 ; case, the named register should be used for the source register of the `addi`.
9 ; The inline assembly will, by default, contain the ABI names for the registers.
11 ; Parenthesised registers in comments are the other aliases for this register.
13 define double @explicit_register_fr0_d(double %a, double %b) nounwind {
14 ; CSKYIFD-LABEL: explicit_register_fr0_d:
16 ; CSKYIFD-NEXT: subi16 sp, sp, 4
17 ; CSKYIFD-NEXT: fmovd vr0, vr1
19 ; CSKYIFD-NEXT: faddd vr0, vr0, vr0
20 ; CSKYIFD-NEXT: #NO_APP
21 ; CSKYIFD-NEXT: addi16 sp, sp, 4
23 %1 = tail call double asm "faddd $0, $1, $2", "=v,{fr0},{fr0}"(double %a, double %b)
27 define double @explicit_register_vr0_d(double %a, double %b) nounwind {
28 ; CSKYIFD-LABEL: explicit_register_vr0_d:
30 ; CSKYIFD-NEXT: subi16 sp, sp, 4
31 ; CSKYIFD-NEXT: fmovd vr0, vr1
33 ; CSKYIFD-NEXT: faddd vr0, vr0, vr0
34 ; CSKYIFD-NEXT: #NO_APP
35 ; CSKYIFD-NEXT: addi16 sp, sp, 4
37 %1 = tail call double asm "faddd $0, $1, $2", "=v,{vr0},{vr0}"(double %a, double %b)
41 define float @explicit_register_fr0_s(float %a, float %b) nounwind {
42 ; CSKYIFD-LABEL: explicit_register_fr0_s:
44 ; CSKYIFD-NEXT: subi16 sp, sp, 4
45 ; CSKYIFD-NEXT: fstod vr0, vr1
47 ; CSKYIFD-NEXT: fadds vr0, vr0, vr0
48 ; CSKYIFD-NEXT: #NO_APP
49 ; CSKYIFD-NEXT: addi16 sp, sp, 4
51 %1 = tail call float asm "fadds $0, $1, $2", "=v,{fr0},{fr0}"(float %a, float %b)
55 define float @explicit_register_vr0_s(float %a, float %b) nounwind {
56 ; CSKYIFD-LABEL: explicit_register_vr0_s:
58 ; CSKYIFD-NEXT: subi16 sp, sp, 4
59 ; CSKYIFD-NEXT: fstod vr0, vr1
61 ; CSKYIFD-NEXT: fadds vr0, vr0, vr0
62 ; CSKYIFD-NEXT: #NO_APP
63 ; CSKYIFD-NEXT: addi16 sp, sp, 4
65 %1 = tail call float asm "fadds $0, $1, $2", "=v,{vr0},{vr0}"(float %a, float %b)