[PATCH] D155582: [DAG] More aggressively (extract_vector_elt (build_vector x, y), c) iff element is zero constant

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 08:42:01 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:21715
+    if (TLI.aggressivelyPreferBuildVectorSources(VecVT) ||
+        isNullConstant(Elt) || VecOp.hasOneUse()) {
+      // Sometimes build_vector's scalar input types do not match result type.
----------------
probably `hasOneUse` check should come first? Just because it cheaper?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155582



More information about the llvm-commits mailing list