This is an archive of the discontinued LLVM Phabricator instance.

[LoopFlattening] Check for extra uses on Mul
ClosedPublic

Authored by dmgreen on Jan 6 2023, 1:04 AM.

Details

Summary

Similar to D138404, we were not guarding against extra uses of the Mul. In most cases other checks would catch the issue due to unsupported instructions in the outer loop, but certain non-canonical loop forms could still get through.

Fixes #59339

Diff Detail

Event Timeline

dmgreen created this revision.Jan 6 2023, 1:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2023, 1:04 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
dmgreen requested review of this revision.Jan 6 2023, 1:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2023, 1:04 AM
SjoerdMeijer accepted this revision.Jan 6 2023, 5:00 AM

Thanks a lot for fixing this!

llvm/test/Transforms/LoopFlatten/pr59339.ll
3–4

This comment can now be removed, or perhaps better adjusted.

This revision is now accepted and ready to land.Jan 6 2023, 5:00 AM
nikic added a subscriber: nikic.Jan 6 2023, 6:11 AM

Please avoid unnamed instructions/blocks in tests, which make future updates a PITA. You can avoid this using opt -passes=instnamer.

This revision was landed with ongoing or failed builds.Jan 6 2023, 7:32 AM
This revision was automatically updated to reflect the committed changes.