[all-commits] [llvm/llvm-project] 2a82c1: [LV] Consider runtime checks profitable if scalar ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Jul 4 13:37:31 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a82c15f63d42cf01e401d533f01adf68c96afdc
      https://github.com/llvm/llvm-project/commit/2a82c15f63d42cf01e401d533f01adf68c96afdc
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-07-04 (Mon, 04 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

  Log Message:
  -----------
  [LV] Consider runtime checks profitable if scalar cost is zero.

This fixes an UBSan failure after 644a965c1efef. When using
user-provided VFs/ICs (via the force-vector-width /
force-vector-interleave options) the scalar cost is zero, which would
cause divide-by-zero.

When forcing vectorization using the options, the cost of the runtime
checks should not block vectorization.




More information about the All-commits mailing list