[all-commits] [llvm/llvm-project] 7b6476: [SVE] Fix TypeSize related warnings with IR trunca...

david-arm via All-commits all-commits at lists.llvm.org
Tue Aug 25 01:18:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b64765cd19a60d6d56106769d06cdff5b660479
      https://github.com/llvm/llvm-project/commit/7b64765cd19a60d6d56106769d06cdff5b660479
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2020-08-25 (Tue, 25 Aug 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
    A llvm/test/Analysis/CostModel/AArch64/sve-trunc.ll
    A llvm/test/Transforms/InstCombine/AArch64/sve-trunc.ll

  Log Message:
  -----------
  [SVE] Fix TypeSize related warnings with IR truncates of scalable vectors

In getCastInstrCost when the instruction is a truncate we were relying
upon the implicit TypeSize -> uint64_t cast when asking if a given type
has the same size as a legal integer. I've changed the code to only
ask the question if the type is fixed length.

I have also changed InstCombinerImpl::SimplifyDemandedUseBits to bail
out for now if the type is a scalable vector.

I've added the following new tests:

  Analysis/CostModel/AArch64/sve-trunc.ll
  Transforms/InstCombine/AArch64/sve-trunc.ll

for both of these fixes.

Differential revision: https://reviews.llvm.org/D86432




More information about the All-commits mailing list