This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Implement FCOPYSIGN for SVE.
ClosedPublic

Authored by efriedma on Aug 5 2021, 3:37 PM.

Details

Summary

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.

Diff Detail

Unit TestsFailed

Event Timeline

efriedma created this revision.Aug 5 2021, 3:37 PM
efriedma requested review of this revision.Aug 5 2021, 3:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2021, 3:37 PM
paulwalker-arm added a comment.EditedAug 6 2021, 3:11 AM

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?

Matt added a subscriber: Matt.Aug 6 2021, 8:52 AM

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.

paulwalker-arm accepted this revision.Aug 9 2021, 5:26 AM

Thanks @efriedma . I'll add VSELECT/SVE2 as something for us to look into.

This revision is now accepted and ready to land.Aug 9 2021, 5:26 AM
This revision was landed with ongoing or failed builds.Aug 9 2021, 12:07 PM
This revision was automatically updated to reflect the committed changes.