This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Fix for compiler side issue in PCRelative Local Exec
ClosedPublic

Authored by stefanp on Sep 21 2020, 9:28 AM.

Details

Summary

Stop combining loads and stores with PPCISD::ADD_TLS before we can merge the
node with with TLS_LOCAL_EXEC_MAT_ADDR. The issue is that
TLS_LOCAL_EXEC_MAT_ADDR cannot be selected by itself and requires the previous
ADD_TLS node that goes with it. However, we sometimes try to combine ADD_TLS
with loads and stores that come after it. If this happens then the ADD_TLS is
removed and TLS_LOCAL_EXEC_MAT_ADDR cannot be selected.

While this bug fix will address the issue it my not be ideal from a performance
perspective as we may be able to add patterns to combine TLS_LOCAL_EXEC_MAT_ADDR
with ADD_TLS with the load and store that comes after it all in one. However,
this is beyond the scope of this patch.

Diff Detail

Event Timeline

stefanp created this revision.Sep 21 2020, 9:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2020, 9:28 AM
stefanp requested review of this revision.Sep 21 2020, 9:28 AM
stefanp added reviewers: NeHuang, sfertile, Restricted Project.Sep 21 2020, 9:29 AM
NeHuang accepted this revision as: NeHuang.Sep 21 2020, 1:36 PM

LGTM.

This revision is now accepted and ready to land.Sep 21 2020, 1:36 PM