[llvm] [SLPVectorizer] Use DenseMap::operator[] (NFC) (PR #107123)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 09:23:38 PDT 2024


================
@@ -11841,9 +11841,9 @@ void BoUpSLP::reorderInputsAccordingToOpcode(ArrayRef<Value *> VL,
 }
 
 Instruction &BoUpSLP::getLastInstructionInBundle(const TreeEntry *E) {
-  auto &Res = EntryToLastInstruction.FindAndConstruct(E);
-  if (Res.second)
-    return *Res.second;
+  auto &Res = EntryToLastInstruction[E];
----------------
alexey-bataev wrote:

I would prefer find instead

https://github.com/llvm/llvm-project/pull/107123


More information about the llvm-commits mailing list