This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][TLS] Add additional TLS X-Form loads/store instructions
ClosedPublic

Authored by amyk on Jun 23 2023, 9:42 AM.

Details

Summary

This patch is a follow up to D43315, and adds the following new load/store
TLS specific instructions for integer and floating point scalar types:

LHAXTLS
LWAXTLS
LHAXTLS_32
LWAXTLS_32
LFSXTLS
LFDXTLS
STFSXTLS
STFDXTLS

These instructions can be used to optimized TLS sequences when D-Form
loads/stores follow an ADD_TLS instruction.

Duplicate versions of these instructions are also added within an isAsmParserOnly=1
block (similar to D47382) to allow llvm-mc to assemble these instructions.

Diff Detail

Event Timeline

amyk created this revision.Jun 23 2023, 9:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2023, 9:42 AM
amyk requested review of this revision.Jun 23 2023, 9:42 AM
amyk edited the summary of this revision. (Show Details)Jun 23 2023, 9:44 AM
amyk edited the summary of this revision. (Show Details)
lei accepted this revision as: lei.Jun 23 2023, 10:25 AM

I don't know why adding new instructions would change where some older instructions are located in P10InstrResources.td, but since that is auto generated I will assume it is a separate issue that need to be looked into.
LGTM other then a nit.

llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
784–788

I feel like this should be indented thus instead....

This revision is now accepted and ready to land.Jun 23 2023, 10:25 AM
amyk updated this revision to Diff 534051.Jun 23 2023, 12:45 PM

Address nit comment regarding indentation in PPCISelDAGToDAG.cpp.

amyk updated this revision to Diff 534197.Jun 24 2023, 5:05 AM

Update indentation/condition checks for sign extending loads in tryTLSXFormLoad()

amyk marked an inline comment as done.Jun 24 2023, 5:05 AM
amyk added inline comments.
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
784–788

Discussed this and we agreed to check this to an if/else instead.

kamaub accepted this revision as: kamaub.Jun 26 2023, 1:50 PM

This LGTM, thank you.

This revision was landed with ongoing or failed builds.Jun 27 2023, 9:33 AM
This revision was automatically updated to reflect the committed changes.
amyk marked an inline comment as done.