This is an archive of the discontinued LLVM Phabricator instance.

[NFC][GlobalISel] Add check for potentially dereferencing null return value
AbandonedPublic

Authored by yubing on Apr 7 2023, 1:58 AM.

Details

Diff Detail

Unit TestsFailed

Event Timeline

yubing created this revision.Apr 7 2023, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2023, 1:58 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
yubing requested review of this revision.Apr 7 2023, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2023, 1:58 AM
yubing added a reviewer: pengfei.

Is this some advanced compiler warning? It looks that assert can't trigger because of if (!Reg) and getConstantVRegValWithLookThrough already checked that Reg is defined by G_FCONSTANT via isFConstant

yubing abandoned this revision.Apr 10 2023, 1:25 AM

yeah i checked the code, you're right. getFConstantVRegValWithLookThrough's isFConstant ensure Reg is defined by TargetOpcode::G_FCONSTANT @Petar.Avramovic