This is an archive of the discontinued LLVM Phabricator instance.

Use addrspacecast instead of target-specific intrinsics in NVPTXGenericToNVVM.
ClosedPublic

Authored by jlebar on Feb 28 2018, 3:00 PM.

Details

Summary

NVPTXGenericToNVVM was using target-specific intrinsics to do address
space casts. Using the addrspacecast instruction is (a lot) simpler.
But it also has the advantage of being understandable to other passes.
In particular, InferAddrSpaces is able to understand these address space
casts and remove them in most cases.