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

Thomas Raoux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 10:50:03 PDT 2020


ThomasRaoux marked an inline comment as done.
ThomasRaoux added a comment.

Thanks David!



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


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

https://reviews.llvm.org/D76664





More information about the llvm-commits mailing list