[llvm] r352565 - GlobalISel: Fix unused variable warning in release builds

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 29 15:38:42 PST 2019


Author: arsenm
Date: Tue Jan 29 15:38:42 2019
New Revision: 352565

URL: http://llvm.org/viewvc/llvm-project?rev=352565&view=rev
Log:
GlobalISel: Fix unused variable warning in release builds

Modified:
    llvm/trunk/lib/CodeGen/GlobalISel/LegalizerHelper.cpp

Modified: llvm/trunk/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/LegalizerHelper.cpp?rev=352565&r1=352564&r2=352565&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/LegalizerHelper.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/LegalizerHelper.cpp Tue Jan 29 15:38:42 2019
@@ -795,13 +795,12 @@ LegalizerHelper::widenScalar(MachineInst
 
     unsigned NumSrc = MI.getNumOperands() - 1;
     unsigned EltSize = DstTy.getSizeInBits() / NumSrc;
-    LLT EltTy = LLT::scalar(EltSize);
 
     unsigned ResultReg = MRI.createGenericVirtualRegister(DstTy);
     unsigned Offset = 0;
     for (unsigned I = 1, E = MI.getNumOperands(); I != E; ++I,
            Offset += EltSize) {
-      assert(MRI.getType(MI.getOperand(I).getReg()) == EltTy);
+      assert(MRI.getType(MI.getOperand(I).getReg()) == LLT::scalar(EltSize));
 
       unsigned ShiftAmt = MRI.createGenericVirtualRegister(DstTy);
       unsigned Shl = MRI.createGenericVirtualRegister(DstTy);




More information about the llvm-commits mailing list