[all-commits] [llvm/llvm-project] 80a403: [VPlan] Support PHIs as LastInst when inserting sc...

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Jun 17 01:37:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 80a403348b0f4f5429c40816bf02ae37bd2e85a1
      https://github.com/llvm/llvm-project/commit/80a403348b0f4f5429c40816bf02ae37bd2e85a1
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

  Log Message:
  -----------
  [VPlan] Support PHIs as LastInst when inserting scalars in ::get().

At the moment, we create insertelement instructions directly after
LastInst when inserting scalar values in a vector in
VPTransformState::get.

This results in invalid IR when LastInst is a phi, followed by another
phi. In that case, the new instructions should be inserted just after
the last PHI node in the block.

At the moment, I don't think the problematic case can be triggered, but
it can happen once predicate regions are merged and multiple
VPredInstPHI recipes are in the same block (D100260).

Reviewed By: Ayal

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




More information about the All-commits mailing list