Skip to content

Commit

Permalink
Fix warnings about unused varibles on builds without asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarev committed Jul 12, 2023
1 parent 02ba405 commit e705b2b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e705b2b

Please sign in to comment.