[PATCH] D100851: [DAGCombiner] Support all-ones/all-zeros SPLAT_VECTOR in more combines

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 07:14:16 PDT 2021


paulwalker-arm accepted this revision.
paulwalker-arm added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:10054
 
   // Fold (vselect (build_vector all_ones), N1, N2) -> N1
+  if (ISD::isConstantSplatVectorAllOnes(N0.getNode()))
----------------
frasercrmck wrote:
> I wasn't sure if I should reword this comment. Unsure how it could be done without just making it more verbose.
Perhaps just drop `build_vector`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100851



More information about the llvm-commits mailing list