1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,X64
5 define <8 x i32> @v8i32_cmpgt(<8 x i32> %i, <8 x i32> %j) nounwind readnone {
6 ; CHECK-LABEL: v8i32_cmpgt:
8 ; CHECK-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9 ; CHECK-NEXT: ret{{[l|q]}}
10 %bincmp = icmp slt <8 x i32> %i, %j
11 %x = sext <8 x i1> %bincmp to <8 x i32>
15 define <4 x i64> @v4i64_cmpgt(<4 x i64> %i, <4 x i64> %j) nounwind readnone {
16 ; CHECK-LABEL: v4i64_cmpgt:
18 ; CHECK-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19 ; CHECK-NEXT: ret{{[l|q]}}
20 %bincmp = icmp slt <4 x i64> %i, %j
21 %x = sext <4 x i1> %bincmp to <4 x i64>
25 define <16 x i16> @v16i16_cmpgt(<16 x i16> %i, <16 x i16> %j) nounwind readnone {
26 ; CHECK-LABEL: v16i16_cmpgt:
28 ; CHECK-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
29 ; CHECK-NEXT: ret{{[l|q]}}
30 %bincmp = icmp slt <16 x i16> %i, %j
31 %x = sext <16 x i1> %bincmp to <16 x i16>
35 define <32 x i8> @v32i8_cmpgt(<32 x i8> %i, <32 x i8> %j) nounwind readnone {
36 ; CHECK-LABEL: v32i8_cmpgt:
38 ; CHECK-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
39 ; CHECK-NEXT: ret{{[l|q]}}
40 %bincmp = icmp slt <32 x i8> %i, %j
41 %x = sext <32 x i1> %bincmp to <32 x i8>
45 define <8 x i32> @int256_cmpeq(<8 x i32> %i, <8 x i32> %j) nounwind readnone {
46 ; CHECK-LABEL: int256_cmpeq:
48 ; CHECK-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
49 ; CHECK-NEXT: ret{{[l|q]}}
50 %bincmp = icmp eq <8 x i32> %i, %j
51 %x = sext <8 x i1> %bincmp to <8 x i32>
55 define <4 x i64> @v4i64_cmpeq(<4 x i64> %i, <4 x i64> %j) nounwind readnone {
56 ; CHECK-LABEL: v4i64_cmpeq:
58 ; CHECK-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
59 ; CHECK-NEXT: ret{{[l|q]}}
60 %bincmp = icmp eq <4 x i64> %i, %j
61 %x = sext <4 x i1> %bincmp to <4 x i64>
65 define <16 x i16> @v16i16_cmpeq(<16 x i16> %i, <16 x i16> %j) nounwind readnone {
66 ; CHECK-LABEL: v16i16_cmpeq:
68 ; CHECK-NEXT: vpcmpeqw %ymm1, %ymm0, %ymm0
69 ; CHECK-NEXT: ret{{[l|q]}}
70 %bincmp = icmp eq <16 x i16> %i, %j
71 %x = sext <16 x i1> %bincmp to <16 x i16>
75 define <32 x i8> @v32i8_cmpeq(<32 x i8> %i, <32 x i8> %j) nounwind readnone {
76 ; CHECK-LABEL: v32i8_cmpeq:
78 ; CHECK-NEXT: vpcmpeqb %ymm1, %ymm0, %ymm0
79 ; CHECK-NEXT: ret{{[l|q]}}
80 %bincmp = icmp eq <32 x i8> %i, %j
81 %x = sext <32 x i1> %bincmp to <32 x i8>
84 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: