Page MenuHomePhabricator

[AArch64][GlobalISel] Don't match thread-local globals in matchFoldGlobalOffset
ClosedPublic

Authored by paquette on Apr 28 2021, 11:17 AM.

Details

Summary

SelectionDAG has separate ISD opcodes for regular global values and thread-local global values, while GlobalISel does not.

This combine was ported from SDAG directly without knowing that. As a result, it was running on TLS globals.

This makes it so that matchFoldGlobalOffset doesn't match on TLS globals, and adds an assert to selectTLSGlobalValue to make sure that TLS globals never have offsets.

Diff Detail

Event Timeline

paquette created this revision.Apr 28 2021, 11:17 AM
paquette requested review of this revision.Apr 28 2021, 11:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2021, 11:17 AM
aemerson accepted this revision.Apr 28 2021, 1:36 PM

Wow, that was a nasty one. Thanks for tracking it down. LGTM.

This revision is now accepted and ready to land.Apr 28 2021, 1:36 PM
This revision was landed with ongoing or failed builds.Apr 28 2021, 1:48 PM
This revision was automatically updated to reflect the committed changes.