This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Add llvm.amdgcn.sqrt intrinsic
ClosedPublic

Authored by arsenm on Jun 25 2020, 8:04 AM.

Details

Summary

I spread the GlobalISel test into the regular one, which I've been
avoiding so far.

Diff Detail

Event Timeline

arsenm created this revision.Jun 25 2020, 8:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2020, 8:04 AM
rampitec accepted this revision.Jun 25 2020, 9:17 AM
This revision is now accepted and ready to land.Jun 25 2020, 9:17 AM
foad added a comment.Jun 25 2020, 9:17 AM

Thanks! I assume the intention is that it should map directly to a v_sqrt_f* instruction, even if llvm.sqrt does something more sophisticated?

llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
819

Typo "shoulud".

foad added a comment.Jun 25 2020, 9:18 AM

Can we have f16 tests too, if it works for f16?

Can we have f16 tests too, if it works for f16?

I didn't realize there was an f16 version, but apparently there is

arsenm updated this revision to Diff 273459.Jun 25 2020, 11:03 AM

Handle f16

foad accepted this revision.Jun 26 2020, 1:07 AM

Typo is still there but otherwise LGTM.