This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Remove redundant code
ClosedPublic

Authored by tomatih on Aug 24 2023, 8:58 AM.

Details

Summary

Coverity flagged an "Unchecked return value" issue.
I have investigated it and the isUndef function is constant with no arguments, only returning a value.
The function does make an assert, but it isn't relevant as next time Cond[1] is used is in the preserveCondRegFlags function which again calls isUndef on it this time using the return value.
As such the line is truly redundant and has been removed.

Diff Detail

Event Timeline

tomatih created this revision.Aug 24 2023, 8:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 8:58 AM
tomatih requested review of this revision.Aug 24 2023, 8:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 8:58 AM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm accepted this revision.Aug 24 2023, 1:15 PM
This revision is now accepted and ready to land.Aug 24 2023, 1:15 PM
This revision was landed with ongoing or failed builds.Aug 25 2023, 3:20 AM
Closed by commit rG232f0c9a9aa1: [NFC][AMDGPU] Remove redundant code (authored by tomatih, committed by ldrumm). · Explain Why
This revision was automatically updated to reflect the committed changes.