[PATCH] D76664: [ConstantFold][NFC] Compile time optimization for large vectors

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 10:50:30 PDT 2020


majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/IR/Instructions.cpp:1965
+  }
+  Result.resize(NumElts);
   if (auto *CDS = dyn_cast<ConstantDataSequential>(Mask)) {
----------------
Instead of resize, I'd reserve + push_back. resize fills the vector with values you will overwrite anyway.


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

https://reviews.llvm.org/D76664





More information about the llvm-commits mailing list