This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Lower loads from global constants using ld.global.nc (aka LDG).
ClosedPublic

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

Details

Summary

After D43914, loads from global variables in addrspace(1) happen with
ld.global. But since they're constants, even better would be to use
ld.global.nc, aka ldg.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar created this revision.Feb 28 2018, 3:38 PM
tra accepted this revision.Feb 28 2018, 3:53 PM

Test nit. LGTM otherwise.

llvm/test/CodeGen/NVPTX/read-global-variable-constant.ll
19 ↗(On Diff #136413)

Should there be a CHECK: ld.global.nc.... here and below?

This revision is now accepted and ready to land.Feb 28 2018, 3:53 PM
jlebar marked an inline comment as done.Feb 28 2018, 4:00 PM
jlebar added inline comments.
llvm/test/CodeGen/NVPTX/read-global-variable-constant.ll
19 ↗(On Diff #136413)

Haha, oops. :) Thanks.

This revision was automatically updated to reflect the committed changes.
jlebar marked an inline comment as done.