[all-commits] [llvm/llvm-project] ff9ac3: [ARM][MVE] Validate tail predication values

Sam Parker via All-commits all-commits at lists.llvm.org
Tue Mar 10 02:59:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ff9ac33e1e02a7c637b8cdf081a7d88f40bf387f
      https://github.com/llvm/llvm-project/commit/ff9ac33e1e02a7c637b8cdf081a7d88f40bf387f
  Author: Sam Parker <sam.parker at arm.com>
  Date:   2020-03-10 (Tue, 10 Mar 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
    A llvm/test/CodeGen/Thumb2/LowOverheadLoops/invariant-qreg.mir
    A llvm/test/CodeGen/Thumb2/LowOverheadLoops/predicated-invariant.mir
    A llvm/test/CodeGen/Thumb2/LowOverheadLoops/unpredicated-max.mir

  Log Message:
  -----------
  [ARM][MVE] Validate tail predication values

Iterate through the loop and check that the observable values
produced are the same whether tail predication happens or not.

We want to find out if the tail-predicated version of this loop will
produce the same values as the loop in its original form. For this to
be true, the newly inserted implicit predication must not change the
the (observable) results.

We're doing this because many instructions in the loop will not be
predicated and so the conversion from VPT predication to tail
predication can result in different values being produced, because of
falsely predicated lanes not being updated in the converted form.

A masked load, whether through VPT or tail predication, will write
zeros to any of the falsely predicated bytes. So, from the loads, we
know that the false lanes are zeroed and here we're trying to track
that those false lanes remain zero, or where they change, the
differences are masked away by their user(s).

All MVE loads and stores have to be predicated, so we know that any
load operands, or stored results are equivalent already. Other
explicitly predicated instructions will perform the same operation in
the original loop and the tail-predicated form too. Because of this,
we can insert loads, stores and other predicated instructions into
our KnownFalseZeros set and build from there.

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




More information about the All-commits mailing list