This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes][NFC] Use getConstantOperandAPInt instead of cast constant getAPInt
ClosedPublic

Authored by Jimerlife on Aug 10 2022, 11:36 PM.

Details

Summary

Use getConstantOperandAPInt(Num) instead of cast<ConstantSDNode>(N->getOperand(Num))->getAPIntValue()

Diff Detail

Event Timeline

Jimerlife created this revision.Aug 10 2022, 11:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2022, 11:36 PM
Jimerlife requested review of this revision.Aug 10 2022, 11:36 PM
RKSimon added inline comments.Aug 11 2022, 2:51 AM
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
1558

const APInt &

5355

const APInt &

Jimerlife updated this revision to Diff 451793.Aug 11 2022, 3:03 AM
Jimerlife marked 2 inline comments as done.
RKSimon accepted this revision.Aug 11 2022, 3:48 AM

LGTM - cheers

This revision is now accepted and ready to land.Aug 11 2022, 3:48 AM