[PATCH][AVX512] Fix scalar floating point select.

Bader, Aleksey A aleksey.a.bader at intel.com
Wed Dec 11 12:56:46 PST 2013

Hi Elena,

Attached new version of the patch.

1)      Implemented masked movss/movsd and used it instead of vselect (i.e. vmovups).

2)      In order to get compare code I re-used SSECC from translateX86FSETCC. This function does replacement + argument swap for some opcodes. GE -> LE, %a(xmm0) >= %eps (xmm3) -> %eps(xmm3) <= %a(xmm0).


From: Demikhovsky, Elena
Sent: Wednesday, December 11, 2013 4:51 PM
To: Bader, Aleksey A
Cc: llvm-commits at cs.uiuc.edu
Subject: RE: [PATCH][AVX512] Fix scalar floating point select.

+; CHECK-LABEL: @select02
+; CHECK: cmpless           %xmm0, %xmm3, %k1
+; CHECK-NEXT: vmovups            %zmm2, %zmm1 {%k1}
+define float @select02(float %a, float %b, float %c, float %eps) {
+  %cmp = fcmp oge float %a, %eps
+  %cond = select i1 %cmp, float %c, float %b
+  ret float %cond

Some comments:

1)      Please use VMOVSS xmm1 {k1}{z}, xmm2, xmm3 instead of VMOVUPS.

2)      Why "oge" has been translated to "le" and not to "lt" ?

-           Elena

From: Bader, Aleksey A
Sent: Wednesday, December 11, 2013 14:10
To: llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
Cc: Demikhovsky, Elena
Subject: [PATCH][AVX512] Fix scalar floating point select.


Attached is a small patch to fix compilation of select tests for scalar floating point arguments.


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

More information about the llvm-commits mailing list