This is an archive of the discontinued LLVM Phabricator instance.

[X86] Don't try to generate direct calls to TLS globals
ClosedPublic

Authored by mkuper on Jan 7 2015, 3:31 AM.

Details

Summary

The Call lowering assumes that if it's a global, we want to emit a direct call.
This is correct for regular globals, but not for TLS ones.

Diff Detail

Repository
rL LLVM

Event Timeline

mkuper updated this revision to Diff 17849.Jan 7 2015, 3:31 AM
mkuper updated this revision to Diff 17850.
mkuper retitled this revision from to [X86] Don't try to generate direct calls to TLS globals.
mkuper updated this object.
mkuper edited the test plan for this revision. (Show Details)
mkuper added a reviewer: majnemer.
mkuper added a subscriber: Unknown Object (MLST).
rafael accepted this revision.Jan 7 2015, 8:33 AM
rafael added a reviewer: rafael.
rafael added a subscriber: rafael.

LGTM with a nit.

test/CodeGen/X86/pr22103.ll
12 ↗(On Diff #17850)

Please check what we actually generate.

This revision is now accepted and ready to land.Jan 7 2015, 8:33 AM
majnemer accepted this revision.Jan 7 2015, 9:55 AM
majnemer edited edge metadata.

LGTM to me as well with Rafael's nit addressed, thanks for fixing this!

This revision was automatically updated to reflect the committed changes.