[llvm] ff78d23 - [AArch64] Ensure Source1 and Source2 are initialized.
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri May 16 14:03:29 PDT 2025
Author: David Green
Date: 2025-05-16T22:03:25+01:00
New Revision: ff78d233c0c40f94ef922a4ea1b88e02bd126040
URL: https://github.com/llvm/llvm-project/commit/ff78d233c0c40f94ef922a4ea1b88e02bd126040
DIFF: https://github.com/llvm/llvm-project/commit/ff78d233c0c40f94ef922a4ea1b88e02bd126040.diff
LOG: [AArch64] Ensure Source1 and Source2 are initialized.
Try to appease the sanatizers builders by making sure the Source1 and Source2
and initialized when passed to the tuple.
See #139331.
Added:
Modified:
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index a2ce9c97bb50e..3f10da23b3494 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -5485,7 +5485,7 @@ InstructionCost AArch64TTIImpl::getShuffleCost(
SmallVector<int> NMask;
// Split the existing mask into chunks of size LTNumElts. Track the source
// sub-vectors to ensure the result has at most 2 inputs.
- unsigned Source1, Source2;
+ unsigned Source1 = 0, Source2 = 0;
unsigned NumSources = 0;
for (unsigned E = 0; E < LTNumElts; E++) {
int MaskElt = (N * LTNumElts + E < TpNumElts) ? Mask[N * LTNumElts + E]
More information about the llvm-commits
mailing list