[all-commits] [llvm/llvm-project] fb1c55: [CodeGen] Fix FoldConstantVectorArithmetic for sca...

david-arm via All-commits all-commits at lists.llvm.org
Fri May 15 06:59:13 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fb1c55b57dda134866803bdf3cdda2cc57a7dc5c
      https://github.com/llvm/llvm-project/commit/fb1c55b57dda134866803bdf3cdda2cc57a7dc5c
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

  Log Message:
  -----------
  [CodeGen] Fix FoldConstantVectorArithmetic for scalable vectors

For now I have changed FoldConstantVectorArithmetic to return early
if we encounter a scalable vector, since the subsequent code assumes
you can perform lane-wise constant folds. However, in future work we
should be able to extend this to look at splats of a constant value
and fold those if possible. I have also added the same code to
FoldConstantArithmetic, since that deals with vectors too.

The warnings I fixed in this patch were being generated by this
existing test:

  CodeGen/AArch64/sve-int-arith.ll

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




More information about the All-commits mailing list