[PATCH] D82292: [SelectionDAG] Lower @llvm.get.active.lane.mask to setcc

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 15:39:10 PDT 2020


SjoerdMeijer added a comment.

In D82292#2109908 <https://reviews.llvm.org/D82292#2109908>, @efriedma wrote:

> In general, you need to overflow check the increment.  (In lanes where it overflows, we should return false.)


I don't think I am going to get the overflow checks right for a case like this:

  define <4 x i32> @v4i32(i32 %index, i32 %BTC, <4 x i32> %V1, <4 x i32> %V2) {
    %active.lane.mask = call <4 x i1> @llvm.get.active.lane.mask.v4i1.i32(i32 %index, i32 %BTC)
   ..
  }

Even with more context, if this is a loop, I am not sure, and I don't think SelectionDAG is the right framework for this.

To me it looks like we've discovered the perfect motivating case here to start looking into redefining llvm.get.active.lane.mask, because this is now problematic in 2 different places: here and in the tail-predication pass. I had postponed doing this as I thought I could first quickly fix this before returning to that and  happily forgot about this overflow case here. So, I am going to look at llvm.get.active.lane.mask now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82292/new/

https://reviews.llvm.org/D82292





More information about the llvm-commits mailing list