Skip to content

Commit f3f0a8f

Browse files
frederik-harsenm
andauthored
Apply suggestions from code review
Co-authored-by: Matt Arsenault <[email protected]>
1 parent 58a2edb commit f3f0a8f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/CodeGen/ExpandLargeFpConvert.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static bool expandFRem(BinaryOperator &I) {
387387
if (ReturnTy->isFloatingPointTy())
388388
Ret = Expander->buildFRem(I.getOperand(0), I.getOperand(1));
389389
else {
390-
auto VecTy = cast<FixedVectorType>(ReturnTy);
390+
auto *VecTy = cast<FixedVectorType>(ReturnTy);
391391

392392
// This could use SplitBlockAndInsertForEachLane but the interface
393393
// is a bit awkward for a constant number of elements and it will
@@ -406,8 +406,7 @@ static bool expandFRem(BinaryOperator &I) {
406406

407407
I.replaceAllUsesWith(Ret);
408408
Ret->takeName(&I);
409-
I.removeFromParent();
410-
I.dropAllReferences();
409+
I.eraseFromParent();
411410

412411
return true;
413412
}
@@ -1036,7 +1035,7 @@ static bool runImpl(Function &F, const TargetLowering &TLI) {
10361035
while (!Replace.empty()) {
10371036
Instruction *I = Replace.pop_back_val();
10381037
if (I->getOpcode() == Instruction::FRem)
1039-
expandFRem(llvm::cast<BinaryOperator>(*I));
1038+
expandFRem(cast<BinaryOperator>(*I));
10401039
else if (I->getOpcode() == Instruction::FPToUI ||
10411040
I->getOpcode() == Instruction::FPToSI) {
10421041
expandFPToI(I);

0 commit comments

Comments
 (0)