Skip to content

Commit

Permalink
[RISCV] CV-ALU-LLVM-intrinsics: Remove redundant unsigned comparison.
Browse files Browse the repository at this point in the history
This patch removes a redundant comparison of an unsigned value as
greater or equal to zero from code written for the CV ALU LLVM
instrinsics.
This redundant comparison caused a warning when building LLVM.
  • Loading branch information
PaoloS02 committed Jan 1, 2024
1 parent 60b830e commit 6a369cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ bool RISCVExpandPseudo::expandCoreVAddSub(llvm::MachineBasicBlock &MBB,
Register Y = MBBI->getOperand(2).getReg();
uint8_t Shift = MBBI->getOperand(3).getImm();

bool IsImm = 0 <= Shift && Shift <= 31;
bool IsImm = Shift <= 31;
unsigned Opcode;
switch (MBBI->getOpcode()) {
case RISCV::CV_ADDN_PSEUDO:
Expand Down

0 comments on commit 6a369cc

Please sign in to comment.