1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
3 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names \
4 ; RUN: -ppc-vsr-nums-as-vr < %s | FileCheck %s
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \
6 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names \
7 ; RUN: -ppc-vsr-nums-as-vr < %s | FileCheck %s
9 ; Function Attrs: norecurse nounwind readonly
10 define dso_local <2 x double> @test1(<2 x float>* nocapture readonly %Ptr) {
12 ; CHECK: # %bb.0: # %entry
13 ; CHECK-NEXT: lfd f0, 0(r3)
14 ; CHECK-NEXT: xxmrghw vs0, vs0, vs0
15 ; CHECK-NEXT: xvcvspdp v2, vs0
18 %0 = load <2 x float>, <2 x float>* %Ptr, align 8
19 %1 = fpext <2 x float> %0 to <2 x double>
23 ; Function Attrs: norecurse nounwind readonly
24 define dso_local <2 x double> @test2(<2 x float>* nocapture readonly %a, <2 x float>* nocapture readonly %b) {
26 ; CHECK: # %bb.0: # %entry
27 ; CHECK-NEXT: lfd f0, 0(r4)
28 ; CHECK-NEXT: lfd f1, 0(r3)
29 ; CHECK-NEXT: xvsubsp vs0, vs1, vs0
30 ; CHECK-NEXT: xxmrghw vs0, vs0, vs0
31 ; CHECK-NEXT: xvcvspdp v2, vs0
34 %0 = load <2 x float>, <2 x float>* %a, align 8
35 %1 = load <2 x float>, <2 x float>* %b, align 8
36 %sub = fsub <2 x float> %0, %1
37 %2 = fpext <2 x float> %sub to <2 x double>
41 ; Function Attrs: norecurse nounwind readonly
42 ; Function Attrs: norecurse nounwind readonly
43 define dso_local <2 x double> @test3(<2 x float>* nocapture readonly %a, <2 x float>* nocapture readonly %b) {
45 ; CHECK: # %bb.0: # %entry
46 ; CHECK-NEXT: lfd f0, 0(r4)
47 ; CHECK-NEXT: lfd f1, 0(r3)
48 ; CHECK-NEXT: xvaddsp vs0, vs1, vs0
49 ; CHECK-NEXT: xxmrghw vs0, vs0, vs0
50 ; CHECK-NEXT: xvcvspdp v2, vs0
53 %0 = load <2 x float>, <2 x float>* %a, align 8
54 %1 = load <2 x float>, <2 x float>* %b, align 8
55 %sub = fadd <2 x float> %0, %1
56 %2 = fpext <2 x float> %sub to <2 x double>
60 ; Function Attrs: norecurse nounwind readonly
61 ; Function Attrs: norecurse nounwind readonly
62 define dso_local <2 x double> @test4(<2 x float>* nocapture readonly %a, <2 x float>* nocapture readonly %b) {
64 ; CHECK: # %bb.0: # %entry
65 ; CHECK-NEXT: lfd f0, 0(r4)
66 ; CHECK-NEXT: lfd f1, 0(r3)
67 ; CHECK-NEXT: xvmulsp vs0, vs1, vs0
68 ; CHECK-NEXT: xxmrghw vs0, vs0, vs0
69 ; CHECK-NEXT: xvcvspdp v2, vs0
72 %0 = load <2 x float>, <2 x float>* %a, align 8
73 %1 = load <2 x float>, <2 x float>* %b, align 8
74 %sub = fmul <2 x float> %0, %1
75 %2 = fpext <2 x float> %sub to <2 x double>