[llvm] [X86][NFC] Use std::move to avoid copy (PR #141455)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 21 10:53:01 PDT 2025


================
@@ -41193,7 +41193,7 @@ static SDValue combineX86ShufflesRecursively(
     resolveTargetShuffleFromZeroables(OpMask, OpUndef, OpZero,
                                       ResolveKnownZeros);
 
-    Mask = OpMask;
+    Mask = std::move(OpMask);
----------------
topperc wrote:

Since OpMask and Mask are SmallVectors, this doesn't avoid a copy if the small storage is being used. The data has to be copied from the small storage of OpMask. I believe the SmallVectors are sized so that they are always using the small size.

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


More information about the llvm-commits mailing list