1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr9 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
3 ; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P9LE
4 ; RUN: llc -mcpu=pwr9 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
5 ; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P9BE
6 ; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
7 ; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P8LE
8 ; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
9 ; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P8BE
11 define void @test_liwzx1(ptr %A, ptr %B, ptr %C) {
12 ; P9LE-LABEL: test_liwzx1:
14 ; P9LE-NEXT: lfs f0, 0(r3)
15 ; P9LE-NEXT: lfs f1, 0(r4)
16 ; P9LE-NEXT: xsaddsp f0, f0, f1
17 ; P9LE-NEXT: stfs f0, 0(r5)
20 ; P9BE-LABEL: test_liwzx1:
22 ; P9BE-NEXT: lfs f0, 0(r3)
23 ; P9BE-NEXT: lfs f1, 0(r4)
24 ; P9BE-NEXT: xsaddsp f0, f0, f1
25 ; P9BE-NEXT: stfs f0, 0(r5)
28 ; P8LE-LABEL: test_liwzx1:
30 ; P8LE-NEXT: lfs f0, 0(r3)
31 ; P8LE-NEXT: lfs f1, 0(r4)
32 ; P8LE-NEXT: xsaddsp f0, f0, f1
33 ; P8LE-NEXT: stfs f0, 0(r5)
36 ; P8BE-LABEL: test_liwzx1:
38 ; P8BE-NEXT: lfs f0, 0(r3)
39 ; P8BE-NEXT: lfs f1, 0(r4)
40 ; P8BE-NEXT: xsaddsp f0, f0, f1
41 ; P8BE-NEXT: stfs f0, 0(r5)
46 %a = load <1 x float>, ptr %A
47 %b = load <1 x float>, ptr %B
48 %X = fadd <1 x float> %a, %b
49 store <1 x float> %X, ptr %C
53 define ptr @test_liwzx2(ptr %A, ptr %B, ptr %C) {
54 ; P9LE-LABEL: test_liwzx2:
56 ; P9LE-NEXT: lfs f0, 0(r3)
57 ; P9LE-NEXT: mr r3, r5
58 ; P9LE-NEXT: lfs f1, 0(r4)
59 ; P9LE-NEXT: xssubsp f0, f0, f1
60 ; P9LE-NEXT: stfs f0, 0(r5)
63 ; P9BE-LABEL: test_liwzx2:
65 ; P9BE-NEXT: lfs f0, 0(r3)
66 ; P9BE-NEXT: mr r3, r5
67 ; P9BE-NEXT: lfs f1, 0(r4)
68 ; P9BE-NEXT: xssubsp f0, f0, f1
69 ; P9BE-NEXT: stfs f0, 0(r5)
72 ; P8LE-LABEL: test_liwzx2:
74 ; P8LE-NEXT: lfs f0, 0(r3)
75 ; P8LE-NEXT: lfs f1, 0(r4)
76 ; P8LE-NEXT: mr r3, r5
77 ; P8LE-NEXT: xssubsp f0, f0, f1
78 ; P8LE-NEXT: stfs f0, 0(r5)
81 ; P8BE-LABEL: test_liwzx2:
83 ; P8BE-NEXT: lfs f0, 0(r3)
84 ; P8BE-NEXT: lfs f1, 0(r4)
85 ; P8BE-NEXT: mr r3, r5
86 ; P8BE-NEXT: xssubsp f0, f0, f1
87 ; P8BE-NEXT: stfs f0, 0(r5)
94 %a = load <1 x float>, ptr %A
95 %b = load <1 x float>, ptr %B
96 %X = fsub <1 x float> %a, %b
97 store <1 x float> %X, ptr %C