[all-commits] [llvm/llvm-project] 67f496: [LV] Skip cost for ZExt/SExts that will be removed...

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Jul 11 03:46:49 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67f4968a57789fa07dcdb0c4421e4beeb725a0db
      https://github.com/llvm/llvm-project/commit/67f4968a57789fa07dcdb0c4421e4beeb725a0db
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll

  Log Message:
  -----------
  [LV] Skip cost for ZExt/SExts that will be removed by truncating ops.

If an extend is truncated, it will be removed if the result type is <=
the source type, as there is nothing to extend. Return a cost of 0.

This was caught by the first step to perform cost-modeling based on
VPlan (b841e2e), as the legacy cost model would query the cost of an
invalid extend, while the extend has been folded away by VPlan
transforms.

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



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