[all-commits] [llvm/llvm-project] 83f5fa: [CodeGen] Improve code generation for clamping of ...

david-arm via All-commits all-commits at lists.llvm.org
Mon Apr 19 01:11:39 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83f5fa519ec5efcad200e4d9eb425e747d58088b
      https://github.com/llvm/llvm-project/commit/83f5fa519ec5efcad200e4d9eb425e747d58088b
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/test/CodeGen/AArch64/named-vector-shuffles-sve.ll
    M llvm/test/CodeGen/AArch64/split-vector-insert.ll
    M llvm/test/CodeGen/AArch64/sve-extract-vector.ll
    M llvm/test/CodeGen/AArch64/sve-insert-vector.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-subvector.ll

  Log Message:
  -----------
  [CodeGen] Improve code generation for clamping of constant indices with scalable vectors

When trying to clamp a constant index into a scalable vector we can
test if the index is less than the minimum number of elements in the
vector. If so, we can simply return the index because we know it is
guaranteed to fit inside the vector.

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




More information about the All-commits mailing list