[PATCH] D118459: [ISEL] Canonicalize STEP_VECTOR to LHS if RHS is a splat.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 07:21:42 PST 2022


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5644
+             N2.getOpcode() == ISD::STEP_VECTOR)
+      std::swap(N1, N2);
   }
----------------
I expect we're going to need this for a lot of the DAG combines as well - is it worth adding a helper wrapper for isConstantIntBuildVectorOrConstantInt/isConstantFPBuildVectorOrConstantFP with SPLAT_VECTOR  and STEP_VECTOR as well?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118459/new/

https://reviews.llvm.org/D118459



More information about the llvm-commits mailing list