[all-commits] [llvm/llvm-project] 3bd161: [LV] Honor forced scalars in setVectorizedCallDeci...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Sep 3 13:07:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3bd161e98d89d31696002994771b7761f1c74859
      https://github.com/llvm/llvm-project/commit/3bd161e98d89d31696002994771b7761f1c74859
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-09-03 (Tue, 03 Sep 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/call-costs.ll

  Log Message:
  -----------
  [LV] Honor forced scalars in setVectorizedCallDecision.

Similarly to dd94537b4, setVectorizedCallDecision also did not consider
ForcedScalars. This lead to VPlans not reflecting the decision by the
legacy cost model (cost computation would use scalar cost, VPlan would
have VPWidenCallRecipe).

To fix this, check if the call has been forced to scalar in
setVectorizedCallDecision.

Note that this requires moving setVectorizedCallDecision after
collectLoopUniforms (which sets ForcedScalars). collectLoopUniforms does
not depend on call decisions and can safely be moved.

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



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