HomePhabricator

[InterleavedAccess] Return correct 'modified' status.

Authored by fhahn on Jan 4 2021, 7:49 AM.

Description

[InterleavedAccess] Return correct 'modified' status.

Both tryReplaceExtracts and replaceBinOpShuffles may modify the IR, even
if no interleaved loads are generated, but currently the pass pretends
no changes were made.

This patch updates the pass to return true if either of the functions
made any changes. In case of tryReplaceExtracts, changes are made if
there are any Extracts and true is returned.

replaceBinOpShuffles always makes changes if BinOpShuffles is not empty.
It also always returned true, so I went ahead and change it to just
replaceBinOpShuffles.

Fixes PR48208.

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D93997