I was originally going to try to implement this in target-independent code, but it's actually sort of tricky to generate the correct sequence for vectors like nxv2f32. So just stick this in target-specific code, at least for now.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Hi Eli, I just wondered if it was better to make use of BSL here? or whether you think that's best done as a later DAGCombine?
EDIT: Actually I guess my question is why not use ISD::VSELECT in place of the manual masking and insertion?
Comment Actions
I'm not really paying attention to SVE2 at the moment, but I guess it's possible to use bsl there.
Like I note in the comments, it would be possible to use FNEG_MERGE_PASSTHRU... but fabs+cmp+fneg isn't really better than this sequence. I briefly tried using VSELECT directly, but we're missing a bunch of combines to make that work well.