This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Fix NVPTXReplaceImageHandles for multiple uses of a texref
ClosedPublic

Authored by slydiman on Feb 12 2022, 9:22 AM.

Details

Summary

The texsurf_handle is removed by NVPTXReplaceImageHandles.cpp. There are more than one uses of the texsurf_handle, one of them is a regular function call, and one of them is a texture intrinsic. The current hacky logic in NVPTXReplaceImageHandles.cpp for CUDA cannot handle such a mixed use. This patch fixes this issue.

Diff Detail

Event Timeline

slydiman created this revision.Feb 12 2022, 9:22 AM
slydiman requested review of this revision.Feb 12 2022, 9:22 AM
tra accepted this revision.Feb 14 2022, 1:43 PM
tra added a reviewer: tra.
tra added a subscriber: tra.

LGTM.

llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp
9

NVIDIA has stopped supporting Fermi(AKA sm_20) few years ago: https://nvidia.custhelp.com/app/answers/detail/a_id/4654/~/support-plan-for-fermi-series-geforce-gpus

We should probably start thinking of removing sm_20 support from LLVM, too.

This revision is now accepted and ready to land.Feb 14 2022, 1:43 PM