[PATCH] D144274: [InstCombine] use loop info when running the pass after loop vectorization

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 09:01:45 PST 2023


spatel created this revision.
spatel added reviewers: nikic, craig.topper, dmgreen, RKSimon.
Herald added subscribers: StephenFan, hiraditya, mcrosier.
Herald added a project: All.
spatel requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

This is the follow-up to D144199 <https://reviews.llvm.org/D144199> and suggestion from D144045 <https://reviews.llvm.org/D144045>. We make use of loop info explicit via InstCombine pass parameter rather than semi-arbitrary via caching.

The only InstCombine transform that uses LoopInfo currently is a GEP fold in visitGEPOfGEP(), so that shows up as a failure in the dedicated test for the fold as well as several LoopVectorizer tests that run extra passes.

I don't see any pass manager regression tests that actually check for pass options, but based on the LoopVectorizer test expectations, I assumed that we want to use loop analysis on all of the InstCombine invocations following vectorization.


https://reviews.llvm.org/D144274

Files:
  llvm/lib/Passes/PassBuilderPipelines.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/constant-fold-gep.ll
  llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
  llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
  llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-store-accesses-with-gaps.ll
  llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll
  llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144274.498396.patch
Type: text/x-patch
Size: 10796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230217/5760472b/attachment.bin>


More information about the llvm-commits mailing list