[llvm] b8b434b - [GISEL] Silence unused variable warning. NFC
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 11:46:34 PST 2024
Author: Benjamin Kramer
Date: 2024-03-07T20:46:10+01:00
New Revision: b8b434b3e150f1c79b114893e36f8e447e560b80
URL: https://github.com/llvm/llvm-project/commit/b8b434b3e150f1c79b114893e36f8e447e560b80
DIFF: https://github.com/llvm/llvm-project/commit/b8b434b3e150f1c79b114893e36f8e447e560b80.diff
LOG: [GISEL] Silence unused variable warning. NFC
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
index a5a136e2effc60..28e5bf85ca9ce6 100644
--- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@ -744,8 +744,7 @@ MachineInstrBuilder MachineIRBuilder::buildShuffleSplat(const DstOp &Res,
MachineInstrBuilder MachineIRBuilder::buildSplatVector(const DstOp &Res,
const SrcOp &Src) {
- LLT DstTy = Res.getLLTTy(*getMRI());
- assert(Src.getLLTTy(*getMRI()) == DstTy.getElementType() &&
+ assert(Src.getLLTTy(*getMRI()) == Res.getLLTTy(*getMRI()).getElementType() &&
"Expected Src to match Dst elt ty");
return buildInstr(TargetOpcode::G_SPLAT_VECTOR, Res, Src);
}
More information about the llvm-commits
mailing list