Please review: Optimize vector multiply on X86

Demikhovsky, Elena elena.demikhovsky at intel.com
Sun Jun 16 06:30:35 PDT 2013


No problem. I just copy the value to avoid additional operations.

+    // Canonicalize constant to RHS.
+    SDValue N0 = LHS;
+    SDValue N1 = RHS;
+    if (N0C && !N1C) {
+      N0 = RHS;
+      N1 = LHS;
+      N1C = N0C;
+    }

-           Elena

From: Jakub Staszak [mailto:kubastaszak at gmail.com]
Sent: Sunday, June 16, 2013 16:16
To: Demikhovsky, Elena
Cc: Jakub Staszak; LLVM Commits
Subject: Re: Please review: Optimize vector multiply on X86

You just should use cast<> instead of dyn_cast<>.   dyn_cast<> isn't free even in Release code. Also cast<> does the check in Debug code.

- Kuba

On Jun 16, 2013, at 3:00 PM, "Demikhovsky, Elena" <elena.demikhovsky at intel.com<mailto:elena.demikhovsky at intel.com>> wrote:


  N1C = dyn_cast<ConstantSDNode>(N1.getOperand(0));           <<= at this point I know that N1 is constant, I can add assert

---------------------------------------------------------------------
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/20130616/9c194fc1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mul.diff
Type: application/octet-stream
Size: 6968 bytes
Desc: mul.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130616/9c194fc1/attachment.obj>


More information about the llvm-commits mailing list