[PATCH] D107372: [InstCombine] Fixed select + masked load fold failure

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 4 05:06:12 PDT 2021


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:3234
+                                   m_CombineOr(m_Undef(), m_Zero()))) &&
+      (CondVal->getType() == Mask->getType())) {
     // We can remove the select by ensuring the load zeros all lanes the
----------------
Not a big issue but looking at the definition of select I think this can just be `isa<VectorType>(CondVal->getType)` and having that first in the if's condition block would prevent unnecessary calls to `match` and thus improve compile time by the odd nanosecond.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107372



More information about the llvm-commits mailing list