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

Bader, Aleksey A aleksey.a.bader at intel.com
Sun Dec 15 03:34:57 PST 2013


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
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

--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation

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/109a30ed/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: knl.icmp.v2.diff
Type: application/octet-stream
Size: 1918 bytes
Desc: knl.icmp.v2.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131215/109a30ed/attachment.obj>


More information about the llvm-commits mailing list