[PATCH] D75452: [ARM][MVE] Validate tail predication live-ins

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 06:52:46 PST 2020


samparker created this revision.
samparker added reviewers: dmgreen, SjoerdMeijer.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.

Check that a loop doesn't use a loop-invariant vector value. We currently check that all loads and stores are predicated and we only allow q-reg values to be live-out of the loop if they're explicitly predicated, but this doesn't cover in-loop horizontal operations that produce a scalar. If these operations have an invariant in their use chain, then performing tail-predication could produce a different value.
This is currently a heavy-handed approach that will prevent tail-predication unnecessarily in some cases; for instance the test function 'invariant_use_store' wouldn't be affected by the invariant use because only lane-wise operations are used that are finally stored using a VPT block. But this should allow us to use horizontal operations safely without having to explicitly predicate them and the next iteration can inspect the use-def chain further to make it less restrictive.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75452

Files:
  llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/invariant-qreg.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75452.247626.patch
Type: text/x-patch
Size: 29051 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200302/ed5a73ae/attachment.bin>


More information about the llvm-commits mailing list