This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Replace some libcalls with intrinsics
ClosedPublic

Authored by arsenm on Aug 14 2023, 7:44 AM.

Details

Reviewers
rampitec
foad
jmmartinez
cdevadas
Pierre-vh
Group Reviewers
Restricted Project
Summary

OpenCL loses fast math information by going through libcall wrappers
around intrinsics.

Do this to preserve call site flags which are lost when inlining. It's
not safe in general to propagate flags during inline, so avoid dealing
with this by just special casing some of the useful calls.

Diff Detail

Unit TestsFailed

Event Timeline

arsenm created this revision.Aug 14 2023, 7:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 7:44 AM
arsenm requested review of this revision.Aug 14 2023, 7:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 7:44 AM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec accepted this revision.Aug 14 2023, 10:39 AM

Looks nice!

This revision is now accepted and ready to land.Aug 14 2023, 10:39 AM
arsenm added inline comments.Aug 14 2023, 3:19 PM
llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
601–615

deferring the log handling since this exposed some failures when using fast math for denormal values (apparently the conformance test enforces some accuracy limit with fast math?)