[all-commits] [llvm/llvm-project] b446ec: [LV] Make sure the MaxVF is a power-of-2 by roundi...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Jun 2 02:41:33 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b446ec56a2987ba02dc2c80d42100be4a4689215
      https://github.com/llvm/llvm-project/commit/b446ec56a2987ba02dc2c80d42100be4a4689215
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-06-02 (Tue, 02 Jun 2020)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/X86/fp80-widest-type.ll

  Log Message:
  -----------
  [LV] Make sure the MaxVF is a power-of-2 by rounding down.

LV currently only supports power of 2 vectorization factors, which has
been made explicit with the assertion added in
840450549c9199150cbdee29acef756c19660ca1.

However, if the widest type is not a power-of-2 the computed MaxVF won't
be a power-of-2 either. This patch updates computeFeasibleMaxVF to
ensure the returned value is a power-of-2 by rounding down to the
nearest power-of-2.

Fixes PR46139.

Reviewers: Ayal, gilr, rengolin

Reviewed By: Ayal

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




More information about the All-commits mailing list