[PATCH] D17041: [X86] Don't assume that a shuffle operand is #0: it isn't for VPERMV.

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 10:21:49 PST 2016


spatel added a comment.




================
Comment at: lib/Target/X86/X86ISelLowering.cpp:5014
@@ -5010,1 +5013,3 @@
     IsUnary = true;
+    // VPERMV is special in that its operands are "inverted".
+    Ops.push_back(N->getOperand(1));
----------------
Make this comment explicit? Something like:
"Unlike most shuffle nodes, VPERMV's mask operand is operand 0."
I think we should also note this in the header file definition for any nodes that are "special".

Given that you've already done the work, I think we might as well move forward on this path.
There's really no hope of maintaining sanity. I just saw page 5-600 (p. 706) of:
https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf

Embrace the madness. :)


http://reviews.llvm.org/D17041





More information about the llvm-commits mailing list