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
4 define <2 x double> @maxpd(<2 x double> %x, <2 x double> %y) {
7 ; CHECK-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
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
14 define <2 x double> @minpd(<2 x double> %x, <2 x double> %y) {
17 ; CHECK-NEXT: vminpd %xmm1, %xmm0, %xmm0
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
24 define <4 x float> @maxps(<4 x float> %x, <4 x float> %y) {
27 ; CHECK-NEXT: vmaxps %xmm1, %xmm0, %xmm0
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
34 define <4 x float> @minps(<4 x float> %x, <4 x float> %y) {
37 ; CHECK-NEXT: vminps %xmm1, %xmm0, %xmm0
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
44 define <4 x double> @vmaxpd(<4 x double> %x, <4 x double> %y) {
45 ; CHECK-LABEL: vmaxpd:
47 ; CHECK-NEXT: vmaxpd %ymm1, %ymm0, %ymm0
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
54 define <4 x double> @vminpd(<4 x double> %x, <4 x double> %y) {
55 ; CHECK-LABEL: vminpd:
57 ; CHECK-NEXT: vminpd %ymm1, %ymm0, %ymm0
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
64 define <8 x float> @vmaxps(<8 x float> %x, <8 x float> %y) {
65 ; CHECK-LABEL: vmaxps:
67 ; CHECK-NEXT: vmaxps %ymm1, %ymm0, %ymm0
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
74 define <8 x float> @vminps(<8 x float> %x, <8 x float> %y) {
75 ; CHECK-LABEL: vminps:
77 ; CHECK-NEXT: vminps %ymm1, %ymm0, %ymm0
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