Skip to content

Commit

Permalink
[GlobalISel] Fix -Wunused-variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Dec 1, 2020
1 parent fdbd84c commit 36fe1a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Expand Up @@ -638,8 +638,8 @@ MachineIRBuilder::buildBuildVectorTrunc(const DstOp &Res,
MachineInstrBuilder MachineIRBuilder::buildShuffleSplat(const DstOp &Res,
const SrcOp &Src) {
LLT DstTy = Res.getLLTTy(*getMRI());
LLT SrcTy = Src.getLLTTy(*getMRI());
assert(SrcTy == DstTy.getElementType() && "Expected Src to match Dst elt ty");
assert(Src.getLLTTy(*getMRI()) == DstTy.getElementType() &&
"Expected Src to match Dst elt ty");
auto UndefVec = buildUndef(DstTy);
auto Zero = buildConstant(LLT::scalar(64), 0);
auto InsElt = buildInsertVectorElement(DstTy, UndefVec, Src, Zero);
Expand Down

0 comments on commit 36fe1a9

Please sign in to comment.