This is an archive of the discontinued LLVM Phabricator instance.

[ConstantFolding] Use ICmpInst::Predicate instead of plain integer
ClosedPublic

Authored by sepavloff on Dec 29 2021, 9:25 AM.

Details

Summary

The function ConstantFoldCompareInstruction uses unsigned short to
represent compare predicate, although all usesrs of the respective
include file use definition of CmpInst also. This change replaces
predicate argument type in this function to ICmpInst::Predicate,
which allows to make code a bit clearer and simpler.

No functional changes.

Diff Detail

Event Timeline

sepavloff created this revision.Dec 29 2021, 9:25 AM
sepavloff requested review of this revision.Dec 29 2021, 9:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 29 2021, 9:25 AM
This revision is now accepted and ready to land.Dec 29 2021, 9:35 AM
This revision was landed with ongoing or failed builds.Dec 30 2021, 12:09 AM
This revision was automatically updated to reflect the committed changes.