This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Lower fpto*i.sat intrinsics for NEON.
ClosedPublic

Authored by jbramley on Aug 20 2021, 5:47 AM.

Details

Summary

Following on from D102353, extend the fpto*i.sat intrinsics to use NEON
fcvt* instructions.

Diff Detail

Event Timeline

jbramley created this revision.Aug 20 2021, 5:47 AM
jbramley requested review of this revision.Aug 20 2021, 5:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2021, 5:47 AM
jbramley added inline comments.Aug 20 2021, 6:40 AM
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
991 ↗(On Diff #367770)

I omitted this suggestion, applying the golden rule. The 450 lines of diff made the actual change non-obvious (with default diff options), but I can include it if that's preferred.

dmgreen added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
3396

I don't think this "Warning" adds much. It's OK to remove for now.

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
1084 ↗(On Diff #367770)

This would need tests, and is probably best left for a separate commit. I think there would need to be more general FP_TO_SINT_SAT costing changes, it won't ever get here at the moment as they are intrinsics not cast instructions.

llvm/test/CodeGen/AArch64/fptosi-sat-vector.ll
2–3

Can you add a run line with fp16 too.

jbramley marked 3 inline comments as done.Aug 23 2021, 8:18 AM

Thanks for the review!

jbramley updated this revision to Diff 368128.Aug 23 2021, 9:33 AM

Address review comments.

dmgreen accepted this revision.Aug 26 2021, 12:29 AM

LGTM.

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