[PATCH][AVX512] Broken icmp for <16 x i64>.

Demikhovsky, Elena elena.demikhovsky at intel.com
Sun Dec 15 03:57:07 PST 2013


LGTM,

I'll commit tomorrow

-           Elena

From: Bader, Aleksey A
Sent: Sunday, December 15, 2013 13:35
To: Demikhovsky, Elena; llvm-commits at cs.uiuc.edu
Subject: RE: [PATCH][AVX512] Broken icmp for <16 x i64>.

Nice catch. Thanks.
Patch updated.

From: Demikhovsky, Elena
Sent: Sunday, December 15, 2013 1:32 PM
To: Bader, Aleksey A; llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
Subject: RE: [PATCH][AVX512] Broken icmp for <16 x i64>.

+def : Pat<(v16i1 (concat_vectors (v8i1 VK8:$src1), (v8i1 VK8:$src2))),
+          (v16i1 (KUNPCKBWrr (COPY_TO_REGCLASS VK8:$src1, VK16), (COPY_TO_REGCLASS VK8:$src2, VK16)))>;
+
I think you should switch src1 and src2 because according to the spec
KUNPCKBW
DEST[7:0] <-- SRC2[7:0]
DEST[15:8] <-- SRC1[7:0]


-           Elena

From: Bader, Aleksey A
Sent: Friday, December 13, 2013 17:45
To: llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
Cc: Demikhovsky, Elena
Subject: [PATCH][AVX512] Broken icmp for <16 x i64>.

Hi,

This patch fixes the following test on AVX512:
define <16 x i1> @test1(<16 x i64> %a, <16 x i64> %b) nounwind {
  %res = icmp eq <16 x i64> %a, %b
  ret <16 x i1> %res
}

Currently llc produces

        vpcmpeqq        %zmm3, %zmm1, %k0
        kmovw   %k0, (%rsp)
        vpcmpeqq        %zmm2, %zmm0, %k0
        kmovw   %k0, (%rsp)
       kmovw   (%rsp), %k0
        kmovw   %k0, (%rdi)

Thanks,
Alexey
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131215/6ca001ef/attachment.html>


More information about the llvm-commits mailing list