[PATCH] D86147: [LangRef] WIP: Revise semantics of get.active.lane.mask
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 02:03:59 PDT 2020
samparker added a comment.
Just for complete clarity in my mind of the problem: 'i' defined as the maximum vector width for the loop? So we would expect a loop body like this:
loop:
%base = phi i32 [ 0, %entry ], [ %base.next, %loop ]
%count = phi i32 [ 0, %entry ], [ %count.next, %loop ]
%mask = get.active.lane.mask(i32 %base, i32 %n)
%base.next = add i32 %base, %vector.width
%count.next = add nuw i32 %count, 1
%cmp = icmp ne i32 %count.next, %vector.trip.count
br i1 %cmp, label %loop, label %exit
And so now we need to prove that (%base + (%vector.trip.count * %vector.width)) doesn't overflow for (%vector.trip.count - 1) iterations? If so, that sounds like a task for AddRecExpr::evaluateAtIteration?
> icmp ule (%base + i), %n - 1
How about icmp ult (%base + i), %n?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86147/new/
https://reviews.llvm.org/D86147
More information about the llvm-commits
mailing list