[all-commits] [llvm/llvm-project] f11305: [CodeGen] Fix warnings in DAGCombiner::visitSCALAR...

david-arm via All-commits all-commits at lists.llvm.org
Wed Jul 1 10:47:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f11305780f08969488add6c84439fc91d18692dc
      https://github.com/llvm/llvm-project/commit/f11305780f08969488add6c84439fc91d18692dc
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AArch64/sve-fp.ll

  Log Message:
  -----------
  [CodeGen] Fix warnings in DAGCombiner::visitSCALAR_TO_VECTOR

In visitSCALAR_TO_VECTOR we try to optimise cases such as:

  scalar_to_vector (extract_vector_elt %x)

into vector shuffles of %x. However, it led to numerous warnings
when %x is a scalable vector type, so for now I've changed the
code to only perform the combination on fixed length vectors.
Although we probably could change the code to work with scalable
vectors in certain cases, without a proper profit analysis it
doesn't seem worth it at the moment.

This change fixes up one of the warnings in:

  llvm/test/CodeGen/AArch64/sve-merging-stores.ll

I've also added a simplified version of the same test to:

  llvm/test/CodeGen/AArch64/sve-fp.ll

which already has checks for no warnings.

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




More information about the All-commits mailing list