Home | History | Annotate | Download | only in X86
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 
      3 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=haswell | FileCheck %s
      4 
      5 declare <4 x double> @llvm.minnum.v4f64(<4 x double> %x, <4 x double> %y)
      6 declare <4 x double> @llvm.maxnum.v4f64(<4 x double> %x, <4 x double> %y)
      7 
      8 define <4 x double> @via_minnum(<4 x double> %x, <4 x double> %y) {
      9 ; CHECK-LABEL: via_minnum:
     10 ; CHECK:       # %bb.0:
     11 ; CHECK-NEXT:    vminpd %ymm1, %ymm0, %ymm0
     12 ; CHECK-NEXT:    retq
     13   %z = call fast <4 x double> @llvm.minnum.v4f64(<4 x double> %x, <4 x double> %y) readnone
     14   ret <4 x double> %z
     15 }
     16 
     17 define <4 x double> @via_maxnum(<4 x double> %x, <4 x double> %y) {
     18 ; CHECK-LABEL: via_maxnum:
     19 ; CHECK:       # %bb.0:
     20 ; CHECK-NEXT:    vmaxpd %ymm1, %ymm0, %ymm0
     21 ; CHECK-NEXT:    retq
     22   %z = call fast <4 x double> @llvm.maxnum.v4f64(<4 x double> %x, <4 x double> %y) readnone
     23   ret <4 x double> %z
     24 }
     25 
     26 define <4 x double> @via_fcmp(<4 x double> %x, <4 x double> %y) {
     27 ; CHECK-LABEL: via_fcmp:
     28 ; CHECK:       # %bb.0:
     29 ; CHECK-NEXT:    vminpd %ymm0, %ymm1, %ymm0
     30 ; CHECK-NEXT:    retq
     31   %c = fcmp ule <4 x double> %x, %y
     32   %z = select <4 x i1> %c, <4 x double> %x, <4 x double> %y
     33   ret <4 x double> %z
     34 }
     35 
     36 
     37