[llvm] r281069 - Fix -Wunused-variable for non-assert build.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 11:07:33 PDT 2016
Author: ruiu
Date: Fri Sep 9 13:07:33 2016
New Revision: 281069
URL: http://llvm.org/viewvc/llvm-project?rev=281069&view=rev
Log:
Fix -Wunused-variable for non-assert build.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizeHelper.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizeHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizeHelper.cpp?rev=281069&r1=281068&r2=281069&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizeHelper.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizeHelper.cpp Fri Sep 9 13:07:33 2016
@@ -165,7 +165,6 @@ MachineLegalizeHelper::LegalizeResult
MachineLegalizeHelper::widenScalar(MachineInstr &MI, unsigned TypeIdx,
LLT WideTy) {
LLT Ty = MRI.getType(MI.getOperand(0).getReg());
- unsigned WideSize = WideTy.getSizeInBits();
MIRBuilder.setInstr(MI);
switch (MI.getOpcode()) {
@@ -220,7 +219,7 @@ MachineLegalizeHelper::widenScalar(Machi
return Legalized;
}
case TargetOpcode::G_LOAD: {
- assert(alignTo(Ty.getSizeInBits(), 8) == WideSize &&
+ assert(alignTo(Ty.getSizeInBits(), 8) == WideTy.getSizeInBits() &&
"illegal to increase number of bytes loaded");
unsigned DstExt = MRI.createGenericVirtualRegister(WideTy);
@@ -231,7 +230,7 @@ MachineLegalizeHelper::widenScalar(Machi
return Legalized;
}
case TargetOpcode::G_STORE: {
- assert(alignTo(Ty.getSizeInBits(), 8) == WideSize &&
+ assert(alignTo(Ty.getSizeInBits(), 8) == WideTy.getSizeInBits() &&
"illegal to increase number of bytes modified by a store");
unsigned SrcExt = MRI.createGenericVirtualRegister(WideTy);
More information about the llvm-commits
mailing list