[all-commits] [llvm/llvm-project] 61a065: [VPlan] Fix first-order splices without header mas...

Luke Lau via All-commits all-commits at lists.llvm.org
Thu Jul 3 08:55:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61a0653cc6101ca78929482367ef5f2f9f324b2e
      https://github.com/llvm/llvm-project/commit/61a0653cc6101ca78929482367ef5f2f9f324b2e
  Author: Luke Lau <luke at igalia.com>
  Date:   2025-07-03 (Thu, 03 Jul 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
    M llvm/test/Transforms/LoopVectorize/RISCV/vectorize-force-tail-with-evl-fixed-order-recurrence.ll

  Log Message:
  -----------
  [VPlan] Fix first-order splices without header mask not using EVL (#146672)

This fixes a buildbot failure with EVL tail folding after #144666:
https://lab.llvm.org/buildbot/#/builders/132/builds/1653

For a first-order recurrence to be correct with EVL tail folding we need
to convert splices to vp splices with the EVL operand.
Originally we did this by looking for users of the header mask and its
users, and converting it in createEVLRecipe.

However after #144666 a FOR splice might not actually use the header
mask if it's based off e.g. an induction variable, and so we wouldn't
pick it up in createEVLRecipe.

This fixes this by converting FOR splices separately in a loop over all
recipes in the plan, regardless of whether or not it uses the header
mask.

I think there was some conflation in createEVLRecipe between what was an
optimisation and what was needed for correctness. Most of the transforms
in it just exist to optimize the mask away and we should still emit
correct code without them. So I've renamed it to make the separation
clearer.



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