[PATCH] D32863: InstructionSimplify: Relanding r301766

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 7 07:16:39 PDT 2017


zvi added inline comments.


================
Comment at: lib/Analysis/InstructionSimplify.cpp:4087-4088
+
+  // Canonicalization: if only one input vector is constant, it shall be the
+  // second one.
+  if (Op0Const && !Op1Const) {
----------------
spatel wrote:
> Is the plan to actually do this canonicalization of constant to 2nd operand in InstCombine? If so, wouldn't it make sense to add a "commute" or "commuteMask" (this is what it's called in the DAG) function directly to ShuffleVectorInst and then use that here?
Sounds good. How about we do this as a follow-up patch?


https://reviews.llvm.org/D32863





More information about the llvm-commits mailing list