This is an archive of the discontinued LLVM Phabricator instance.

[MVE] Don't distribute add of vecreduce if it has more than one use
ClosedPublic

Authored by john.brawn on Jul 8 2022, 4:11 AM.

Details

Summary

If the add has more than one use then applying the transformation won't cause it to be removed, so we can end up applying it again causing an infinite loop.

Diff Detail

Event Timeline

john.brawn created this revision.Jul 8 2022, 4:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2022, 4:11 AM
john.brawn requested review of this revision.Jul 8 2022, 4:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2022, 4:11 AM
john.brawn edited reviewers, added: dmgreen; removed: greened.Jul 8 2022, 4:12 AM
dmgreen accepted this revision.Jul 11 2022, 4:27 AM

Oh yeah, this certainly wasn't meant to introduce more nodes. LGTM, thanks.

llvm/lib/Target/ARM/ARMISelLowering.cpp
13353

N1->hasOneUse() will do the same as getting the node.

This revision is now accepted and ready to land.Jul 11 2022, 4:27 AM
This revision was landed with ongoing or failed builds.Jul 11 2022, 6:13 AM
This revision was automatically updated to reflect the committed changes.