1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2 ; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s 3 4 ; Verify that we don't crash during codegen due to a wrong lowering 5 ; of a setcc node with illegal operand types and return type. 6 7 define <8 x i16> @pr25080(<8 x i32> %a) { 8 ; CHECK-LABEL: pr25080: 9 ; CHECK: # BB#0: # %entry 10 ; CHECK-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0 11 ; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1 12 ; CHECK-NEXT: vpxor %xmm2, %xmm2, %xmm2 13 ; CHECK-NEXT: vpcmpeqd %xmm2, %xmm1, %xmm1 14 ; CHECK-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15] 15 ; CHECK-NEXT: vpshufb %xmm3, %xmm1, %xmm1 16 ; CHECK-NEXT: vpcmpeqd %xmm2, %xmm0, %xmm0 17 ; CHECK-NEXT: vpshufb %xmm3, %xmm0, %xmm0 18 ; CHECK-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0] 19 ; CHECK-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0 20 ; CHECK-NEXT: vpsllw $15, %xmm0, %xmm0 21 ; CHECK-NEXT: vpsraw $15, %xmm0, %xmm0 22 ; CHECK-NEXT: vzeroupper 23 ; CHECK-NEXT: retq 24 entry: 25 %0 = trunc <8 x i32> %a to <8 x i23> 26 %1 = icmp eq <8 x i23> %0, zeroinitializer 27 %2 = or <8 x i1> %1, <i1 true, i1 true, i1 true, i1 true, i1 false, i1 false, i1 false, i1 false> 28 %3 = sext <8 x i1> %2 to <8 x i16> 29 ret <8 x i16> %3 30 } 31