[all-commits] [llvm/llvm-project] d16282: [LV] Update logic for calculating register usage d...

sushgokh via All-commits all-commits at lists.llvm.org
Mon Feb 27 21:37:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d1628266946fdddb44bdad2b3ccf3cd5fc769f42
      https://github.com/llvm/llvm-project/commit/d1628266946fdddb44bdad2b3ccf3cd5fc769f42
  Author: sgokhale <sgokhale at nvidia.com>
  Date:   2023-02-28 (Tue, 28 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/AArch64/reg-usage.ll
    M llvm/test/Transforms/LoopVectorize/PowerPC/reg-usage.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/reg-usage.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll
    M llvm/test/Transforms/LoopVectorize/X86/reg-usage-debug.ll

  Log Message:
  -----------
  [LV] Update logic for calculating register usage due to invariants

Previously, while calculating register usage due to invariants, it was assumed that invariant would always be part of widening
instructions. This resulted in calculating vector register types for vectors which cant be legalized(check the newly added test for more details).

An invariant might not always need a vector register. For e.g., invariant might just be used for iteration check.

This patch checks if the invariant is part of any widening instruction and considers register usage accordingly. Fixes issue 60493

Differential Revision: https://reviews.llvm.org/D143422




More information about the All-commits mailing list