Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -march=x86-64 -mattr=+avx -asm-verbose=false -join-physregs -enable-unsafe-fp-math -enable-no-nans-fp-math -promote-elements | FileCheck -check-prefix=UNSAFE %s
      2 
      3 ; UNSAFE: maxpd:
      4 ; UNSAFE: vmaxpd {{.+}}, %xmm
      5 define <2 x double> @maxpd(<2 x double> %x, <2 x double> %y) {
      6   %max_is_x = fcmp oge <2 x double> %x, %y
      7   %max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y
      8   ret <2 x double> %max
      9 }
     10 
     11 ; UNSAFE: minpd:
     12 ; UNSAFE: vminpd {{.+}}, %xmm
     13 define <2 x double> @minpd(<2 x double> %x, <2 x double> %y) {
     14   %min_is_x = fcmp ole <2 x double> %x, %y
     15   %min = select <2 x i1> %min_is_x, <2 x double> %x, <2 x double> %y
     16   ret <2 x double> %min
     17 }
     18 
     19 ; UNSAFE: maxps:
     20 ; UNSAFE: vmaxps {{.+}}, %xmm
     21 define <4 x float> @maxps(<4 x float> %x, <4 x float> %y) {
     22   %max_is_x = fcmp oge <4 x float> %x, %y
     23   %max = select <4 x i1> %max_is_x, <4 x float> %x, <4 x float> %y
     24   ret <4 x float> %max
     25 }
     26 
     27 ; UNSAFE: minps:
     28 ; UNSAFE: vminps {{.+}}, %xmm
     29 define <4 x float> @minps(<4 x float> %x, <4 x float> %y) {
     30   %min_is_x = fcmp ole <4 x float> %x, %y
     31   %min = select <4 x i1> %min_is_x, <4 x float> %x, <4 x float> %y
     32   ret <4 x float> %min
     33 }
     34 
     35 ; UNSAFE: vmaxpd:
     36 ; UNSAFE: vmaxpd %ymm
     37 define <4 x double> @vmaxpd(<4 x double> %x, <4 x double> %y) {
     38   %max_is_x = fcmp oge <4 x double> %x, %y
     39   %max = select <4 x i1> %max_is_x, <4 x double> %x, <4 x double> %y
     40   ret <4 x double> %max
     41 }
     42 
     43 ; UNSAFE: vminpd:
     44 ; UNSAFE: vminpd %ymm
     45 define <4 x double> @vminpd(<4 x double> %x, <4 x double> %y) {
     46   %min_is_x = fcmp ole <4 x double> %x, %y
     47   %min = select <4 x i1> %min_is_x, <4 x double> %x, <4 x double> %y
     48   ret <4 x double> %min
     49 }
     50 
     51 ; UNSAFE: vmaxps:
     52 ; UNSAFE: vmaxps %ymm
     53 define <8 x float> @vmaxps(<8 x float> %x, <8 x float> %y) {
     54   %max_is_x = fcmp oge <8 x float> %x, %y
     55   %max = select <8 x i1> %max_is_x, <8 x float> %x, <8 x float> %y
     56   ret <8 x float> %max
     57 }
     58 
     59 ; UNSAFE: vminps:
     60 ; UNSAFE: vminps %ymm
     61 define <8 x float> @vminps(<8 x float> %x, <8 x float> %y) {
     62   %min_is_x = fcmp ole <8 x float> %x, %y
     63   %min = select <8 x i1> %min_is_x, <8 x float> %x, <8 x float> %y
     64   ret <8 x float> %min
     65 }
     66