This is an archive of the discontinued LLVM Phabricator instance.

remove useless condition in assert in SelectionDAG.cpp
ClosedPublic

Authored by XinWang10 on Apr 14 2023, 12:27 AM.

Details

Summary

The condition Opcode <= std::numeric_limits<int>::max() will
always be true here.

Diff Detail

Event Timeline

XinWang10 created this revision.Apr 14 2023, 12:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2023, 12:27 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
XinWang10 requested review of this revision.Apr 14 2023, 12:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2023, 12:27 AM
XinWang10 edited the summary of this revision. (Show Details)Apr 14 2023, 12:34 AM
XinWang10 added reviewers: sunfish, Eugene.Zelenko.
skan added inline comments.Apr 17 2023, 12:50 AM
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
7955

Should we use Opcode <= (unsigned)std::numeric_limits<int>::max()?

XinWang10 added inline comments.Apr 17 2023, 1:04 AM
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
7955

Yes, it should be the intention of the author.

XinWang10 updated this revision to Diff 514128.Apr 17 2023, 1:05 AM
  • update condition
skan accepted this revision.Apr 17 2023, 2:13 AM

LGTM

This revision is now accepted and ready to land.Apr 17 2023, 2:13 AM
This revision was landed with ongoing or failed builds.Apr 17 2023, 6:54 PM
This revision was automatically updated to reflect the committed changes.