[all-commits] [llvm/llvm-project] ccebf7: [VPlan] Properly handle sinking of replicate regions.

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue May 4 14:36:51 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ccebf7a1096a887e29d1f765cf6b27878466d0f4
      https://github.com/llvm/llvm-project/commit/ccebf7a1096a887e29d1f765cf6b27878466d0f4
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-05-04 (Tue, 04 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    A llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll

  Log Message:
  -----------
  [VPlan] Properly handle sinking of replicate regions.

This patch updates the code that sinks recipes required for first-order
recurrences to properly handle replicate-regions. At the moment, the
code would just move the replicate recipe out of its replicate-region,
producing an invalid VPlan.

When sinking a recipe in a replicate-region, we have to sink the whole
region. To do that, we first need to split the block at the target
recipe and move the region in between.

This patch also adds a splitAt helper to VPBasicBlock to split a
VPBasicBlock at a given iterator.

Fixes PR50009.

Reviewed By: Ayal

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




More information about the All-commits mailing list