• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-- -mattr=+avx -enable-unsafe-fp-math -enable-no-nans-fp-math | FileCheck %s
3
4define <2 x double> @maxpd(<2 x double> %x, <2 x double> %y) {
5; CHECK-LABEL: maxpd:
6; CHECK:       # %bb.0:
7; CHECK-NEXT:    vmaxpd %xmm1, %xmm0, %xmm0
8; CHECK-NEXT:    retq
9  %max_is_x = fcmp oge <2 x double> %x, %y
10  %max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y
11  ret <2 x double> %max
12}
13
14define <2 x double> @minpd(<2 x double> %x, <2 x double> %y) {
15; CHECK-LABEL: minpd:
16; CHECK:       # %bb.0:
17; CHECK-NEXT:    vminpd %xmm1, %xmm0, %xmm0
18; CHECK-NEXT:    retq
19  %min_is_x = fcmp ole <2 x double> %x, %y
20  %min = select <2 x i1> %min_is_x, <2 x double> %x, <2 x double> %y
21  ret <2 x double> %min
22}
23
24define <4 x float> @maxps(<4 x float> %x, <4 x float> %y) {
25; CHECK-LABEL: maxps:
26; CHECK:       # %bb.0:
27; CHECK-NEXT:    vmaxps %xmm1, %xmm0, %xmm0
28; CHECK-NEXT:    retq
29  %max_is_x = fcmp oge <4 x float> %x, %y
30  %max = select <4 x i1> %max_is_x, <4 x float> %x, <4 x float> %y
31  ret <4 x float> %max
32}
33
34define <4 x float> @minps(<4 x float> %x, <4 x float> %y) {
35; CHECK-LABEL: minps:
36; CHECK:       # %bb.0:
37; CHECK-NEXT:    vminps %xmm1, %xmm0, %xmm0
38; CHECK-NEXT:    retq
39  %min_is_x = fcmp ole <4 x float> %x, %y
40  %min = select <4 x i1> %min_is_x, <4 x float> %x, <4 x float> %y
41  ret <4 x float> %min
42}
43
44define <4 x double> @vmaxpd(<4 x double> %x, <4 x double> %y) {
45; CHECK-LABEL: vmaxpd:
46; CHECK:       # %bb.0:
47; CHECK-NEXT:    vmaxpd %ymm1, %ymm0, %ymm0
48; CHECK-NEXT:    retq
49  %max_is_x = fcmp oge <4 x double> %x, %y
50  %max = select <4 x i1> %max_is_x, <4 x double> %x, <4 x double> %y
51  ret <4 x double> %max
52}
53
54define <4 x double> @vminpd(<4 x double> %x, <4 x double> %y) {
55; CHECK-LABEL: vminpd:
56; CHECK:       # %bb.0:
57; CHECK-NEXT:    vminpd %ymm1, %ymm0, %ymm0
58; CHECK-NEXT:    retq
59  %min_is_x = fcmp ole <4 x double> %x, %y
60  %min = select <4 x i1> %min_is_x, <4 x double> %x, <4 x double> %y
61  ret <4 x double> %min
62}
63
64define <8 x float> @vmaxps(<8 x float> %x, <8 x float> %y) {
65; CHECK-LABEL: vmaxps:
66; CHECK:       # %bb.0:
67; CHECK-NEXT:    vmaxps %ymm1, %ymm0, %ymm0
68; CHECK-NEXT:    retq
69  %max_is_x = fcmp oge <8 x float> %x, %y
70  %max = select <8 x i1> %max_is_x, <8 x float> %x, <8 x float> %y
71  ret <8 x float> %max
72}
73
74define <8 x float> @vminps(<8 x float> %x, <8 x float> %y) {
75; CHECK-LABEL: vminps:
76; CHECK:       # %bb.0:
77; CHECK-NEXT:    vminps %ymm1, %ymm0, %ymm0
78; CHECK-NEXT:    retq
79  %min_is_x = fcmp ole <8 x float> %x, %y
80  %min = select <8 x i1> %min_is_x, <8 x float> %x, <8 x float> %y
81  ret <8 x float> %min
82}
83