[all-commits] [llvm/llvm-project] 2e1fbf: [ARM] MVE saturating truncates

David Green via All-commits all-commits at lists.llvm.org
Sat May 16 07:11:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e1fbf85b65de7a45f71c9566136ce19428660ea
      https://github.com/llvm/llvm-project/commit/2e1fbf85b65de7a45f71c9566136ce19428660ea
  Author: David Green <david.green at arm.com>
  Date:   2020-05-16 (Sat, 16 May 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/lib/Target/ARM/ARMISelLowering.h
    M llvm/lib/Target/ARM/ARMInstrMVE.td
    M llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
    M llvm/test/CodeGen/Thumb2/mve-vqmovn-combine.ll
    M llvm/test/CodeGen/Thumb2/mve-vqmovn.ll
    M llvm/test/CodeGen/Thumb2/mve-vqshrn.ll

  Log Message:
  -----------
  [ARM] MVE saturating truncates

This adds some custom lowering for VQMOVN, an instruction that can be
used to perform saturating truncates from a pair of min(max(X, -0x8000),
0x7fff), providing those constants are correct. This leaves a VQMOVNBs
which saturates the value and inserts that into the bottom lanes of an
existing vector. We then need to do something with the other lanes,
extending the value using a vmovlb.

Ideally, as will often be the case, only the bottom lane of what remains
will be demanded, allowing the vmovlb to be removed. Which should mean
the instruction is either equal or a win most of the time, and allows
some extra follow-up folding to happen.

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




More information about the All-commits mailing list