[llvm] e705b2b - Fix warnings about unused varibles on builds without asserts.
Ivan Kosarev via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 06:45:35 PDT 2023
Author: Ivan Kosarev
Date: 2023-07-12T14:45:29+01:00
New Revision: e705b2b1f4a71995d9062984f0d8138f9be9e5eb
URL: https://github.com/llvm/llvm-project/commit/e705b2b1f4a71995d9062984f0d8138f9be9e5eb
DIFF: https://github.com/llvm/llvm-project/commit/e705b2b1f4a71995d9062984f0d8138f9be9e5eb.diff
LOG: Fix warnings about unused varibles on builds without asserts.
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index 1393563aaacc21..c0a0fea51ca345 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -6256,13 +6256,11 @@ LegalizerHelper::LegalizeResult LegalizerHelper::lowerFPTOSI(MachineInstr &MI) {
LegalizerHelper::LegalizeResult
LegalizerHelper::lowerFPTRUNC_F64_TO_F16(MachineInstr &MI) {
const LLT S1 = LLT::scalar(1);
- const LLT S16 = LLT::scalar(16);
const LLT S32 = LLT::scalar(32);
- const LLT S64 = LLT::scalar(64);
auto [Dst, Src] = MI.getFirst2Regs();
- assert(MRI.getType(Dst).getScalarType() == S16 &&
- MRI.getType(Src).getScalarType() == S64);
+ assert(MRI.getType(Dst).getScalarType() == LLT::scalar(16) &&
+ MRI.getType(Src).getScalarType() == LLT::scalar(64));
if (MRI.getType(Src).isVector()) // TODO: Handle vectors directly.
return UnableToLegalize;
More information about the llvm-commits
mailing list