Debian Codegraph @

llvm/test/CodeGen/PowerPC/p9_copy_fp.ll

raw
1 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mattr=+vsx -ppc-vsr-nums-as-vr \
2 ; RUN: -mtriple=powerpc64le-unknown-linux-gnu -ppc-asm-full-reg-names < %s \
3 ; RUN: | FileCheck %s
4 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mattr=+vsx -ppc-vsr-nums-as-vr \
5 ; RUN: -mtriple=powerpc64-unknown-linux-gnu -ppc-asm-full-reg-names < %s \
6 ; RUN: | FileCheck -check-prefix=CHECK-BE %s
7
8 ; Function Attrs: norecurse nounwind readnone
9 define double @cp_fp1(<2 x double> %v) {
10 ; CHECK-LABEL: cp_fp1:
11 ; CHECK: xscpsgndp f1, v2, v2
12 ; CHECK: blr
13
14 ; CHECK-BE-LABEL: cp_fp1:
15 ; CHECK-BE: xxswapd vs1, v2
16 ; CHECK-BE: blr
17 entry:
18 %vecext = extractelement <2 x double> %v, i32 1
19 ret double %vecext
20 }
21
22 ; Function Attrs: norecurse nounwind readnone
23 define double @cp_fp2(<2 x double> %v) {
24 ; CHECK-LABEL: cp_fp2:
25 ; CHECK: xxswapd vs1, v2
26 ; CHECK: blr
27
28 ; CHECK-BE-LABEL: cp_fp2:
29 ; CHECK-BE: xscpsgndp f1, v2, v2
30 ; CHECK-BE: blr
31 entry:
32 %vecext = extractelement <2 x double> %v, i32 0
33 ret double %vecext
34 }
35
36 ; Function Attrs: norecurse nounwind readnone
37 define <2 x double> @cp_fp3(double %v) {
38 ; CHECK-LABEL: cp_fp3:
39 ; CHECK: xxspltd v2, vs1, 0
40 ; CHECK: blr
41
42 ; CHECK-BE-LABEL: cp_fp3:
43 ; CHECK-BE: xscpsgndp v2, f1, f1
44 ; CHECK-BE: blr
45 entry:
46 %vecins = insertelement <2 x double> undef, double %v, i32 0
47 ret <2 x double> %vecins
48 }