[llvm] 8819267 - [InstCombine] Simplify code with SmallMapVector::operator[] (NFC) (#113022)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 19 14:38:44 PDT 2024
Author: Kazu Hirata
Date: 2024-10-19T14:38:40-07:00
New Revision: 8819267747c868309d606f58cb616b05217622eb
URL: https://github.com/llvm/llvm-project/commit/8819267747c868309d606f58cb616b05217622eb
DIFF: https://github.com/llvm/llvm-project/commit/8819267747c868309d606f58cb616b05217622eb.diff
LOG: [InstCombine] Simplify code with SmallMapVector::operator[] (NFC) (#113022)
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 72ebd9fbb6d9e5..d9d41e052a32a6 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -870,8 +870,7 @@ bool InstCombinerImpl::foldAllocaCmp(AllocaInst *Alloca) {
if (ICmp && ICmp->isEquality() && getUnderlyingObject(*U) == Alloca) {
// Collect equality icmps of the alloca, and don't treat them as
// captures.
- auto Res = ICmps.insert({ICmp, 0});
- Res.first->second |= 1u << U->getOperandNo();
+ ICmps[ICmp] |= 1u << U->getOperandNo();
return false;
}
More information about the llvm-commits
mailing list