[PATCH] D57504: RFC: Prototype & Roadmap for vector predication in LLVM

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 07:31:10 PST 2020


cameron.mcinally added a comment.

> Btw, I guess that https://reviews.llvm.org/D71432 shows that op+select folding can be cleanly implemented in isel and that's also in line with my experiments for the VE target.

This needs a caveat. Keeping the select glued to the operation takes some careful effort. Especially in the undef passthru case, there are a bunch of peeps that will incorrectly fold away the select. E.g. this transform from InstSimplify:

  if (isa<UndefValue>(FalseVal))   // select ?, X, undef -> X
    return TrueVal;

The VP intrinsics will certainly be immune to these, but if the plan is to eventually replace the VP select intrinsics with IR selects, then this problem will need to be solved. Just a heads up...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D57504





More information about the llvm-commits mailing list