xref: /llvm-project/llvm/test/CodeGen/X86/pr35972.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=i686-unknown-linux-gnu %s -o - -mattr=avx512bw | FileCheck %s
3
4define void @test3(i32 %c, ptr %ptr) {
5; CHECK-LABEL: test3:
6; CHECK:       # %bb.0:
7; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax
8; CHECK-NEXT:    xorl %ecx, %ecx
9; CHECK-NEXT:    cmpl $1, {{[0-9]+}}(%esp)
10; CHECK-NEXT:    sbbl %ecx, %ecx
11; CHECK-NEXT:    kmovd %ecx, %k0
12; CHECK-NEXT:    kunpckdq %k0, %k0, %k0
13; CHECK-NEXT:    kmovq %k0, (%eax)
14; CHECK-NEXT:    retl
15  %cmp = icmp eq i32 %c, 0
16  %insert = insertelement <64 x i1> undef, i1 %cmp, i32 0
17  %shuf = shufflevector <64 x i1> %insert, <64 x i1> undef, <64 x i32> zeroinitializer
18  store <64 x i1> %shuf, ptr %ptr
19  ret void
20}
21
22