[all-commits] [llvm/llvm-project] ba8126: [LV] Mark dead instructions in loop as free.

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Jul 24 01:32:18 PDT 2024


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

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll

  Log Message:
  -----------
  [LV] Mark dead instructions in loop as free.

Update collectValuesToIgnore to also ignore dead instructions in the
loop. Such instructions will be removed by VPlan-based DCE and won't be
considered by the VPlan-based cost model.

This closes a gap between the legacy and VPlan-based cost model. In
practice with the default pipelines, there shouldn't be any dead
instructions in loops reaching LoopVectorize, but it is easy to generate
such cases by hand or automatically via fuzzers.

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



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