2017-08-02 08:28:10 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-- -mattr=+avx -asm-verbose=false -enable-unsafe-fp-math -enable-no-nans-fp-math | FileCheck -check-prefix=UNSAFE %s
|
2011-09-20 15:38:59 +08:00
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; UNSAFE-LABEL: maxpd:
|
2011-09-20 22:11:35 +08:00
|
|
|
; UNSAFE: vmaxpd {{.+}}, %xmm
|
2011-09-20 15:38:59 +08:00
|
|
|
define <2 x double> @maxpd(<2 x double> %x, <2 x double> %y) {
|
|
|
|
%max_is_x = fcmp oge <2 x double> %x, %y
|
|
|
|
%max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y
|
|
|
|
ret <2 x double> %max
|
|
|
|
}
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; UNSAFE-LABEL: minpd:
|
2011-09-20 22:11:35 +08:00
|
|
|
; UNSAFE: vminpd {{.+}}, %xmm
|
2011-09-20 15:38:59 +08:00
|
|
|
define <2 x double> @minpd(<2 x double> %x, <2 x double> %y) {
|
|
|
|
%min_is_x = fcmp ole <2 x double> %x, %y
|
|
|
|
%min = select <2 x i1> %min_is_x, <2 x double> %x, <2 x double> %y
|
|
|
|
ret <2 x double> %min
|
|
|
|
}
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; UNSAFE-LABEL: maxps:
|
2011-09-20 22:11:35 +08:00
|
|
|
; UNSAFE: vmaxps {{.+}}, %xmm
|
2011-09-20 15:38:59 +08:00
|
|
|
define <4 x float> @maxps(<4 x float> %x, <4 x float> %y) {
|
|
|
|
%max_is_x = fcmp oge <4 x float> %x, %y
|
|
|
|
%max = select <4 x i1> %max_is_x, <4 x float> %x, <4 x float> %y
|
|
|
|
ret <4 x float> %max
|
|
|
|
}
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; UNSAFE-LABEL: minps:
|
2011-09-20 22:11:35 +08:00
|
|
|
; UNSAFE: vminps {{.+}}, %xmm
|
2011-09-20 15:38:59 +08:00
|
|
|
define <4 x float> @minps(<4 x float> %x, <4 x float> %y) {
|
|
|
|
%min_is_x = fcmp ole <4 x float> %x, %y
|
|
|
|
%min = select <4 x i1> %min_is_x, <4 x float> %x, <4 x float> %y
|
|
|
|
ret <4 x float> %min
|
|
|
|
}
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; UNSAFE-LABEL: vmaxpd:
|
2012-02-01 22:35:29 +08:00
|
|
|
; UNSAFE: vmaxpd {{.+}}, %ymm
|
2011-09-20 15:38:59 +08:00
|
|
|
define <4 x double> @vmaxpd(<4 x double> %x, <4 x double> %y) {
|
|
|
|
%max_is_x = fcmp oge <4 x double> %x, %y
|
|
|
|
%max = select <4 x i1> %max_is_x, <4 x double> %x, <4 x double> %y
|
|
|
|
ret <4 x double> %max
|
|
|
|
}
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; UNSAFE-LABEL: vminpd:
|
2012-02-01 22:35:29 +08:00
|
|
|
; UNSAFE: vminpd {{.+}}, %ymm
|
2011-09-20 15:38:59 +08:00
|
|
|
define <4 x double> @vminpd(<4 x double> %x, <4 x double> %y) {
|
|
|
|
%min_is_x = fcmp ole <4 x double> %x, %y
|
|
|
|
%min = select <4 x i1> %min_is_x, <4 x double> %x, <4 x double> %y
|
|
|
|
ret <4 x double> %min
|
|
|
|
}
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; UNSAFE-LABEL: vmaxps:
|
2012-02-01 22:35:29 +08:00
|
|
|
; UNSAFE: vmaxps {{.+}}, %ymm
|
2011-09-20 15:38:59 +08:00
|
|
|
define <8 x float> @vmaxps(<8 x float> %x, <8 x float> %y) {
|
|
|
|
%max_is_x = fcmp oge <8 x float> %x, %y
|
|
|
|
%max = select <8 x i1> %max_is_x, <8 x float> %x, <8 x float> %y
|
|
|
|
ret <8 x float> %max
|
|
|
|
}
|
|
|
|
|
2013-07-14 14:24:09 +08:00
|
|
|
; UNSAFE-LABEL: vminps:
|
2012-02-01 22:35:29 +08:00
|
|
|
; UNSAFE: vminps {{.+}}, %ymm
|
2011-09-20 15:38:59 +08:00
|
|
|
define <8 x float> @vminps(<8 x float> %x, <8 x float> %y) {
|
|
|
|
%min_is_x = fcmp ole <8 x float> %x, %y
|
|
|
|
%min = select <8 x i1> %min_is_x, <8 x float> %x, <8 x float> %y
|
|
|
|
ret <8 x float> %min
|
|
|
|
}
|