[llvm-bugs] [Bug 30945] New: [AVX512] Failure to flip vector comparison to remove not mask instruction
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Nov 8 07:18:15 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=30945
Bug ID: 30945
Summary: [AVX512] Failure to flip vector comparison to remove
not mask instruction
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: craig.topper at gmail.com, elena.demikhovsky at intel.com,
igor.breger at intel.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Unearthed by https://reviews.llvm.org/rL286238
define <16 x i32> @test14(<16 x i32>%a, <16 x i32>%b) {
; CHECK-LABEL: test14:
; CHECK: ## BB#0:
; CHECK-NEXT: vpsubd %zmm1, %zmm0, %zmm1
; CHECK-NEXT: vpcmpled %zmm0, %zmm1, %k0
; CHECK-NEXT: knotw %k0, %k1 <-- REMOVED IF WE USED vpcmpgtd INSTEAD
; CHECK-NEXT: vmovdqa32 %zmm1, %zmm0 {%k1} {z}
; CHECK-NEXT: retq
%sub_r = sub <16 x i32> %a, %b
%cmp.i2.i = icmp sgt <16 x i32> %sub_r, %a
%sext.i3.i = sext <16 x i1> %cmp.i2.i to <16 x i32>
%mask = icmp eq <16 x i32> %sext.i3.i, zeroinitializer
%res = select <16 x i1> %mask, <16 x i32> zeroinitializer, <16 x i32> %sub_r
ret <16 x i32>%res
}
define <8 x i64> @test15(<8 x i64>%a, <8 x i64>%b) {
; CHECK-LABEL: test15:
; CHECK: ## BB#0:
; CHECK-NEXT: vpsubq %zmm1, %zmm0, %zmm1
; CHECK-NEXT: vpcmpleq %zmm0, %zmm1, %k0
; CHECK-NEXT: knotw %k0, %k1m <-- REMOVED IF WE USED vpcmpgtq INSTEAD
; CHECK-NEXT: vmovdqa64 %zmm1, %zmm0 {%k1} {z}
; CHECK-NEXT: retq
%sub_r = sub <8 x i64> %a, %b
%cmp.i2.i = icmp sgt <8 x i64> %sub_r, %a
%sext.i3.i = sext <8 x i1> %cmp.i2.i to <8 x i64>
%mask = icmp eq <8 x i64> %sext.i3.i, zeroinitializer
%res = select <8 x i1> %mask, <8 x i64> zeroinitializer, <8 x i64> %sub_r
ret <8 x i64>%res
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161108/46f2142a/attachment-0001.html>
More information about the llvm-bugs
mailing list