This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Don't map llvm sqrt intrinsics to veclib functions
ClosedPublic

Authored by huntergr on Mar 6 2023, 8:37 AM.

Details

Summary

Since AArch64 has sqrt instructions, we want to use those instead of calls to vector math routines for llvm sqrt intrinsics (since those don't imply some of the constraints that libm calls might have) so we just remove the mappings.

Code originally written by @mgabka

Diff Detail

Event Timeline

huntergr created this revision.Mar 6 2023, 8:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2023, 8:37 AM
huntergr requested review of this revision.Mar 6 2023, 8:37 AM
georges added a subscriber: georges.Mar 6 2023, 8:55 AM
This revision is now accepted and ready to land.Mar 6 2023, 9:02 AM
paulwalker-arm accepted this revision.Mar 6 2023, 9:51 AM

I suspect we'll want to replace replace-intrinsics-with-veclib-sqrt.ll with more exhaustive testing for all the intrinsics but that's a job for another day. I've a couple of observations but otherwise the patch looks good.

llvm/test/CodeGen/AArch64/replace-intrinsics-with-veclib-sqrt.ll
2

Given the simplicity of the tests I doubt you need these extra arguments.

5

Is this required?

54–56

These three are not used within the test and can be removed?