This is an archive of the discontinued LLVM Phabricator instance.

[LoopFlatten] Replace unchecked dyn_cast with cast.
ClosedPublic

Authored by craig.topper on Jun 6 2022, 1:25 PM.

Details

Diff Detail

Event Timeline

craig.topper created this revision.Jun 6 2022, 1:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2022, 1:25 PM
craig.topper requested review of this revision.Jun 6 2022, 1:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2022, 1:25 PM
fhahn added inline comments.Jun 6 2022, 1:48 PM
llvm/lib/Transforms/Scalar/LoopFlatten.cpp
414

I *think* this must by a binary op at the moment, is maybe it's possible to just use cast. If it triggers, we will at least have a test case :)

Use cast instead of dyn_cast

craig.topper retitled this revision from [LoopFlatten] Check for null result after dyn_cast. to [LoopFlatten] Replace unchecked dyn_cast with cast..Jun 6 2022, 5:15 PM
SjoerdMeijer accepted this revision.Jun 7 2022, 12:44 AM

I also think this must be a binary op.

This revision is now accepted and ready to land.Jun 7 2022, 12:44 AM
This revision was landed with ongoing or failed builds.Jun 7 2022, 8:25 AM
This revision was automatically updated to reflect the committed changes.