[PATCH] D65884: [ARM] MVE Tail Predication
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 07:54:23 PDT 2019
samparker marked 5 inline comments as done.
samparker added inline comments.
================
Comment at: lib/Target/ARM/Thumb2TailPredication.cpp:187
+
+bool TPCandidate::isTailPredicate(Value *V, Value *NumElements) {
+ // Look for the following:
----------------
SjoerdMeijer wrote:
> I am not sure, but I'm wondering if this function is misnamed? I think I would expect `isTailPredicate` to work on a Loop, not a Instruction/Value.
TPCandidate has to be constructed with a loop and will only operate upon that loop. This method needs to answer whether V is the value that produces the tail predicate. The tail predicate being defined below in the comments. I will make it explicit that we're answering whether V == %pred.
================
Comment at: lib/Target/ARM/Thumb2TailPredication.cpp:204
+ // %induction = add <4 x i32> %broadcast.splat, <i32 0, i32 1, i32 2, i32 3>
+ // %pred = icmp ule <4 x i32> %induction, %broadcast.splat11
+ using namespace PatternMatch;
----------------
SjoerdMeijer wrote:
> I need to read this function again, but it isn't clear to me yet why this is then a tail-predicated loop and not some other vectorized loop.
It's only answering whether the given value, V, is equivalent to a vctp instruction. So we're not talking about MVE tail predication yet, we're just matching vctp. I expect that most of these loops will then be converted to a tail predicated form.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65884/new/
https://reviews.llvm.org/D65884
More information about the llvm-commits
mailing list