Skip to content

Commit

Permalink
[RISCV] Fix misleading formatting and remove a dead getNode call. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
topperc committed Jun 28, 2022
1 parent 9f94d63 commit ea1b861
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Expand Up @@ -7003,7 +7003,6 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
case ISD::ABS: {
assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() &&
"Unexpected custom legalisation");
DAG.getNode(ISD::SIGN_EXTEND, DL, MVT::i64, N->getOperand(0));

// Expand abs to Y = (sraiw X, 31); subw(xor(X, Y), Y)

Expand Down Expand Up @@ -11974,7 +11973,7 @@ bool RISCVTargetLowering::decomposeMulByConstant(LLVMContext &Context, EVT VT,
APInt ImmS = Imm.ashr(Imm.countTrailingZeros());
if ((ImmS + 1).isPowerOf2() || (ImmS - 1).isPowerOf2() ||
(1 - ImmS).isPowerOf2())
return true;
return true;
}
}
}
Expand Down

0 comments on commit ea1b861

Please sign in to comment.