[all-commits] [llvm/llvm-project] d7e79b: [LV] Check if ops can safely be truncated in compu...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Jul 11 12:19:26 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7e79bd7d4fe326625e06d7ed251092a19e80c42
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M llvm/lib/Analysis/VectorUtils.cpp
    M llvm/test/Transforms/LoopVectorize/trunc-shifts.ll

  Log Message:
  [LV] Check if ops can safely be truncated in computeMinimumValueSizes.

Update computeMinimumValueSizes to check if an instruction's operands
can safely be truncated.

If more than MinBW bits are demanded by for the operand or if the
operand is a constant and cannot be safely truncated, it is not safe to
evaluate the instruction in the narrower MinBW. Skip those cases.

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

Reviewed By: nikic

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

More information about the All-commits mailing list