Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s
      2 
      3 ; CHECK: vpcmpgtd  %ymm
      4 define <8 x i32> @int256-cmp(<8 x i32> %i, <8 x i32> %j) nounwind readnone {
      5   %bincmp = icmp slt <8 x i32> %i, %j
      6   %x = sext <8 x i1> %bincmp to <8 x i32>
      7   ret <8 x i32> %x
      8 }
      9 
     10 ; CHECK: vpcmpgtq  %ymm
     11 define <4 x i64> @v4i64-cmp(<4 x i64> %i, <4 x i64> %j) nounwind readnone {
     12   %bincmp = icmp slt <4 x i64> %i, %j
     13   %x = sext <4 x i1> %bincmp to <4 x i64>
     14   ret <4 x i64> %x
     15 }
     16 
     17 ; CHECK: vpcmpgtw  %ymm
     18 define <16 x i16> @v16i16-cmp(<16 x i16> %i, <16 x i16> %j) nounwind readnone {
     19   %bincmp = icmp slt <16 x i16> %i, %j
     20   %x = sext <16 x i1> %bincmp to <16 x i16>
     21   ret <16 x i16> %x
     22 }
     23 
     24 ; CHECK: vpcmpgtb  %ymm
     25 define <32 x i8> @v32i8-cmp(<32 x i8> %i, <32 x i8> %j) nounwind readnone {
     26   %bincmp = icmp slt <32 x i8> %i, %j
     27   %x = sext <32 x i1> %bincmp to <32 x i8>
     28   ret <32 x i8> %x
     29 }
     30 
     31 ; CHECK: vpcmpeqd  %ymm
     32 define <8 x i32> @int256-cmpeq(<8 x i32> %i, <8 x i32> %j) nounwind readnone {
     33   %bincmp = icmp eq <8 x i32> %i, %j
     34   %x = sext <8 x i1> %bincmp to <8 x i32>
     35   ret <8 x i32> %x
     36 }
     37 
     38 ; CHECK: vpcmpeqq  %ymm
     39 define <4 x i64> @v4i64-cmpeq(<4 x i64> %i, <4 x i64> %j) nounwind readnone {
     40   %bincmp = icmp eq <4 x i64> %i, %j
     41   %x = sext <4 x i1> %bincmp to <4 x i64>
     42   ret <4 x i64> %x
     43 }
     44 
     45 ; CHECK: vpcmpeqw  %ymm
     46 define <16 x i16> @v16i16-cmpeq(<16 x i16> %i, <16 x i16> %j) nounwind readnone {
     47   %bincmp = icmp eq <16 x i16> %i, %j
     48   %x = sext <16 x i1> %bincmp to <16 x i16>
     49   ret <16 x i16> %x
     50 }
     51 
     52 ; CHECK: vpcmpeqb  %ymm
     53 define <32 x i8> @v32i8-cmpeq(<32 x i8> %i, <32 x i8> %j) nounwind readnone {
     54   %bincmp = icmp eq <32 x i8> %i, %j
     55   %x = sext <32 x i1> %bincmp to <32 x i8>
     56   ret <32 x i8> %x
     57 }
     58 
     59