[llvm] f46c1d6 - [PowerPC] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 4 07:53:36 PDT 2025
Author: Kazu Hirata
Date: 2025-07-04T07:53:29-07:00
New Revision: f46c1d6bcc3b26bfcc81248b7260978983e3acc4
URL: https://github.com/llvm/llvm-project/commit/f46c1d6bcc3b26bfcc81248b7260978983e3acc4
DIFF: https://github.com/llvm/llvm-project/commit/f46c1d6bcc3b26bfcc81248b7260978983e3acc4.diff
LOG: [PowerPC] Fix a warning
This patch fixes:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp:9588:16: error: unused
variable 'NumOps' [-Werror,-Wunused-variable]
Added:
Modified:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 3851f052470c6..7bd027ab63ee2 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -9585,8 +9585,7 @@ static bool isValidSplatLoad(const PPCSubtarget &Subtarget, const SDValue &Op,
}
bool isValidMtVsrBmi(APInt &BitMask, BuildVectorSDNode &BVN) {
- unsigned int NumOps = BVN.getNumOperands();
- assert(NumOps > 0 && "Unexpected 0-size build vector");
+ assert(BVN.getNumOperands() > 0 && "Unexpected 0-size build vector");
BitMask.clearAllBits();
EVT VT = BVN.getValueType(0);
More information about the llvm-commits
mailing list