Lower vp.select instrinsic to VSELECT_VL.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks for the patch @victor-eds!
LGTM.
After this change lands, the only lowering missing for vp.select will be for i1 vectors. AFAICT rvv doesn't have specific instructions for that but a sequence of vm<op>.mm and something like this (or a better sequence) https://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge should do. We can't fully honour the vl in that case, but I think this is OK as VP doesn't demand us to do that.
(@craig.topper reading the spec I realised that vmerge (perhaps others?) doesn't seem to care about ma/mu only ta/tu so maybe this can be exploited when inserting vsetvl)