[all-commits] [llvm/llvm-project] 2dfb1c: [VPlan] Try to hoist Previous (and operands), if s...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Oct 23 13:12:25 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2dfb1c664c0a0afc512b900c45989e247406e523
      https://github.com/llvm/llvm-project/commit/2dfb1c664c0a0afc512b900c45989e247406e523
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-10-23 (Wed, 23 Oct 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.h
    M llvm/test/Transforms/LoopVectorize/X86/fixed-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains-vplan.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence-multiply-recurrences.ll

  Log Message:
  -----------
  [VPlan] Try to hoist Previous (and operands), if sinking fails for FORs. (#108945)

In some cases, Previous (and its operands) can be hoisted. This allows
supporting additional cases where sinking of all users of to FOR fails,
e.g. due having to sink recipes with side-effects.

This fixes a crash where we fail to create a scalar VPlan for a
first-order recurrence, but can create a vector VPlan, because the trunc
instruction of an IV which generates the previous value of the
recurrence has been optimized to a truncated induction recipe, thus
hoisting it to the beginning.

Fixes https://github.com/llvm/llvm-project/issues/106523.

PR: https://github.com/llvm/llvm-project/pull/108945



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list