[llvm] 3f27684 - [X86] Use const APInt& in for-range loop to avoid unnecessary copies. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 2 06:33:05 PDT 2020
Author: Simon Pilgrim
Date: 2020-08-02T14:32:22+01:00
New Revision: 3f276840b6f8b2624f0bbeb6097d8049d27d5ca0
URL: https://github.com/llvm/llvm-project/commit/3f276840b6f8b2624f0bbeb6097d8049d27d5ca0
DIFF: https://github.com/llvm/llvm-project/commit/3f276840b6f8b2624f0bbeb6097d8049d27d5ca0.diff
LOG: [X86] Use const APInt& in for-range loop to avoid unnecessary copies. NFCI.
Fixes clang-tidy warning.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index a16c3bf7ac51..ec34dcaaf95b 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -6686,7 +6686,7 @@ static bool getTargetShuffleMaskIndices(SDValue MaskNode,
return false;
// Insert the extracted elements into the mask.
- for (APInt Elt : EltBits)
+ for (const APInt &Elt : EltBits)
RawMask.push_back(Elt.getZExtValue());
return true;
More information about the llvm-commits
mailing list