[all-commits] [llvm/llvm-project] 9cfd04: [VPlan] Don't bail creating interleave group if it...

Luke Lau via All-commits all-commits at lists.llvm.org
Mon Jul 13 10:23:39 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9cfd0411138b33ea11bfce22e41cd026e92120ca
      https://github.com/llvm/llvm-project/commit/9cfd0411138b33ea11bfce22e41cd026e92120ca
  Author: Luke Lau <luke at igalia.com>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-with-wide-ops-chained.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll
    M llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll
    A llvm/test/Transforms/LoopVectorize/interleaved-accesses-dead-member.ll
    M llvm/test/Transforms/LoopVectorize/versioning-dead-load.ll

  Log Message:
  -----------
  [VPlan] Don't bail creating interleave group if it has dead members (#208415)

This is an alternative to both #203555 and #205584.

To recap the issue:

1) The legacy cost model has the invariant that all CM_Interleave
widened groups will eventually be converted to a VPInterleaveGroup, so
it marks the addresses as uniform.
2) After #190191 a CM_Interleave isn't guaranteed to be converted to a
VPInterleaveGroup if it has dead members, and it breaks this assumption
in 1). So addresses aren't properly widened due to the uniform
assumption.

Rather than try to fix up the address, this just maintains the invariant
that a CM_Interleave will become a VPInterleaveGroup by not skipping
over groups with dead members.

While there's slightly less code involved, the main benefit of this
approach vs the others is that it keeps generating interleaved groups
instead of falling back to gathers/scatters, so we don't get a codegen
regression against 22.x.

Co-authored-by: Mel Chen <mel.chen at sifive.com>



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