mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
0f93413ef8
I'm hoping we can just replace SETCC_CARRY with SBB. This is another step towards that. I've explicitly used zero as the input to the setcc to avoid a false dependency that we've had with the SETCC_CARRY. I changed one of the patterns that used NEG to instead use an explicit compare with 0 on the LHS. We needed the zero anyway to avoid the false dependency. The negate would clobber its input register. By using a CMP we can avoid that which could be useful. Differential Revision: https://reviews.llvm.org/D55414 llvm-svn: 348959
22 lines
764 B
LLVM
22 lines
764 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=i686-unknown-linux-gnu %s -o - -mattr=avx512bw | FileCheck %s
|
|
|
|
define void @test3(i32 %c, <64 x i1>* %ptr) {
|
|
; CHECK-LABEL: test3:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
|
|
; CHECK-NEXT: xorl %ecx, %ecx
|
|
; CHECK-NEXT: cmpl $1, {{[0-9]+}}(%esp)
|
|
; CHECK-NEXT: sbbl %ecx, %ecx
|
|
; CHECK-NEXT: kmovd %ecx, %k0
|
|
; CHECK-NEXT: kunpckdq %k0, %k0, %k0
|
|
; CHECK-NEXT: kmovq %k0, (%eax)
|
|
; CHECK-NEXT: retl
|
|
%cmp = icmp eq i32 %c, 0
|
|
%insert = insertelement <64 x i1> undef, i1 %cmp, i32 0
|
|
%shuf = shufflevector <64 x i1> %insert, <64 x i1> undef, <64 x i32> zeroinitializer
|
|
store <64 x i1> %shuf, <64 x i1>* %ptr
|
|
ret void
|
|
}
|
|
|