[llvm] efce8f1 - [X86] combineX86ShufflesRecursively - use enumerate to iterate over shuffle operands. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 09:12:06 PDT 2025
Author: Simon Pilgrim
Date: 2025-04-07T17:09:36+01:00
New Revision: efce8f1ce680b86af48c49edda2c3cbb370a6ba0
URL: https://github.com/llvm/llvm-project/commit/efce8f1ce680b86af48c49edda2c3cbb370a6ba0
DIFF: https://github.com/llvm/llvm-project/commit/efce8f1ce680b86af48c49edda2c3cbb370a6ba0.diff
LOG: [X86] combineX86ShufflesRecursively - use enumerate to iterate over shuffle operands. NFC.
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 d720aadb2e81d..56b0f721383f1 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -41117,8 +41117,7 @@ static SDValue combineX86ShufflesRecursively(
// Peek through vector widenings and set out of bounds mask indices to undef.
// TODO: Can resolveTargetShuffleInputsAndMask do some of this?
- for (unsigned I = 0, E = Ops.size(); I != E; ++I) {
- SDValue &Op = Ops[I];
+ for (auto [I, Op] : enumerate(Ops)) {
if (Op.getOpcode() == ISD::INSERT_SUBVECTOR && Op.getOperand(0).isUndef() &&
isNullConstant(Op.getOperand(2))) {
Op = Op.getOperand(1);
More information about the llvm-commits
mailing list