[PATCH] D93997: [InterleavedAccess] Return correct 'modified' status.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 3 10:41:19 PST 2021


fhahn created this revision.
fhahn added reviewers: spatel, dmgreen, SjoerdMeijer.
Herald added a subscriber: hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93997

Files:
  llvm/lib/CodeGen/InterleavedAccessPass.cpp
  llvm/test/Transforms/InterleavedAccess/X86/interleave-load-extract-shuffle-changes.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93997.314295.patch
Type: text/x-patch
Size: 5302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210103/520e49c3/attachment.bin>


More information about the llvm-commits mailing list