1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \
3 ; RUN: -mcpu=pwr7 < %s | FileCheck %s --check-prefix=CHECK-PWR7
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
5 ; RUN: -mcpu=pwr8 < %s | FileCheck %s --check-prefix=CHECK-PWR8
6 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix \
7 ; RUN: -mcpu=pwr8 < %s | FileCheck %s --check-prefix=CHECK-PWR8
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
9 ; RUN: -mattr=-vsx -mcpu=pwr8 < %s | FileCheck %s --check-prefix=CHECK-NOVSX
11 define dso_local double @test_fsel(double %a, double %b, double %c) local_unnamed_addr {
12 ; CHECK-PWR7-LABEL: test_fsel:
13 ; CHECK-PWR7: # %bb.0: # %entry
14 ; CHECK-PWR7-NEXT: fsel 1, 1, 2, 3
15 ; CHECK-PWR7-NEXT: blr
17 ; CHECK-PWR8-LABEL: test_fsel:
18 ; CHECK-PWR8: # %bb.0: # %entry
19 ; CHECK-PWR8-NEXT: fsel 1, 1, 2, 3
20 ; CHECK-PWR8-NEXT: blr
22 ; CHECK-NOVSX-LABEL: test_fsel:
23 ; CHECK-NOVSX: # %bb.0: # %entry
24 ; CHECK-NOVSX-NEXT: fsel 1, 1, 2, 3
25 ; CHECK-NOVSX-NEXT: blr
28 %0 = tail call double @llvm.ppc.fsel(double %a, double %b, double %c)
32 declare double @llvm.ppc.fsel(double, double, double)
34 define dso_local float @test_fsels(float %a, float %b, float %c) local_unnamed_addr {
35 ; CHECK-PWR7-LABEL: test_fsels:
36 ; CHECK-PWR7: # %bb.0: # %entry
37 ; CHECK-PWR7-NEXT: fsel 1, 1, 2, 3
38 ; CHECK-PWR7-NEXT: blr
40 ; CHECK-PWR8-LABEL: test_fsels:
41 ; CHECK-PWR8: # %bb.0: # %entry
42 ; CHECK-PWR8-NEXT: fsel 1, 1, 2, 3
43 ; CHECK-PWR8-NEXT: blr
45 ; CHECK-NOVSX-LABEL: test_fsels:
46 ; CHECK-NOVSX: # %bb.0: # %entry
47 ; CHECK-NOVSX-NEXT: fsel 1, 1, 2, 3
48 ; CHECK-NOVSX-NEXT: blr
51 %0 = tail call float @llvm.ppc.fsels(float %a, float %b, float %c)
55 declare float @llvm.ppc.fsels(float, float, float)
57 define dso_local double @test_frsqrte(double %a) local_unnamed_addr {
58 ; CHECK-PWR7-LABEL: test_frsqrte:
59 ; CHECK-PWR7: # %bb.0: # %entry
60 ; CHECK-PWR7-NEXT: xsrsqrtedp 1, 1
61 ; CHECK-PWR7-NEXT: blr
63 ; CHECK-PWR8-LABEL: test_frsqrte:
64 ; CHECK-PWR8: # %bb.0: # %entry
65 ; CHECK-PWR8-NEXT: xsrsqrtedp 1, 1
66 ; CHECK-PWR8-NEXT: blr
68 ; CHECK-NOVSX-LABEL: test_frsqrte:
69 ; CHECK-NOVSX: # %bb.0: # %entry
70 ; CHECK-NOVSX-NEXT: frsqrte 1, 1
71 ; CHECK-NOVSX-NEXT: blr
74 %0 = tail call double @llvm.ppc.frsqrte(double %a)
78 declare double @llvm.ppc.frsqrte(double)
80 define dso_local float @test_frsqrtes(float %a) local_unnamed_addr {
81 ; CHECK-PWR7-LABEL: test_frsqrtes:
82 ; CHECK-PWR7: # %bb.0: # %entry
83 ; CHECK-PWR7-NEXT: frsqrtes 1, 1
84 ; CHECK-PWR7-NEXT: blr
86 ; CHECK-PWR8-LABEL: test_frsqrtes:
87 ; CHECK-PWR8: # %bb.0: # %entry
88 ; CHECK-PWR8-NEXT: xsrsqrtesp 1, 1
89 ; CHECK-PWR8-NEXT: blr
91 ; CHECK-NOVSX-LABEL: test_frsqrtes:
92 ; CHECK-NOVSX: # %bb.0: # %entry
93 ; CHECK-NOVSX-NEXT: frsqrtes 1, 1
94 ; CHECK-NOVSX-NEXT: blr
97 %0 = tail call float @llvm.ppc.frsqrtes(float %a)
101 declare float @llvm.ppc.frsqrtes(float)