This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix incorrect assignment of Changed variable in MVEGatherScatterLowering::optimiseOffsets.
ClosedPublic

Authored by craig.topper on Jun 29 2021, 4:27 PM.

Details

Summary

I believe this Changed flag should be initialized to false,
otherwise the if (!Changed) is always dead. This doesn't
manifest in a functional issue because the PHINode checks will
fail if nothing changed. They are identical to the earlier
checks that must have already failed to get into this else block.

While there remove an else after return to reduce indentation.

Diff Detail

Event Timeline

craig.topper created this revision.Jun 29 2021, 4:27 PM
craig.topper requested review of this revision.Jun 29 2021, 4:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2021, 4:27 PM
dmgreen accepted this revision.Jun 30 2021, 12:01 AM

Oh yeah. LGTM. Thanks for the cleanup.

This revision is now accepted and ready to land.Jun 30 2021, 12:01 AM