[all-commits] [llvm/llvm-project] 541e51: [LV] Use getFixedValue instead of getKnownMinValue...

David Sherwood via All-commits all-commits at lists.llvm.org
Fri Jun 13 03:44:12 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 541e5118ce570c9bed74cb5ff836f88cf1c0e644
      https://github.com/llvm/llvm-project/commit/541e5118ce570c9bed74cb5ff836f88cf1c0e644
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2025-06-13 (Fri, 13 Jun 2025)

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

  Log Message:
  -----------
  [LV] Use getFixedValue instead of getKnownMinValue when appropriate (#143526)

There are many places in VPlan and LoopVectorize where we use
getKnownMinValue to discover the number of elements in a vector. Where
we expect the vector to have a fixed length, I have used the stronger
getFixedValue call. I believe this is clearer and adds extra protection
in the form of an assert in getFixedValue that the vector is not
scalable.

While looking at VPFirstOrderRecurrencePHIRecipe::computeCost I also
took the liberty of simplifying the code.

In theory I believe this patch should be NFC, but I'm reluctant to add
that to the title in case we're just missing tests for some of the VPlan
changes. I built and ran the LLVM test suite when targeting neoverse-v1
and it seemed ok.



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