This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Emit dcbt and dcbtst in place of their extended mnemonics on AIX
ClosedPublic

Authored by Conanap on Oct 6 2021, 12:49 PM.

Details

Summary

On AIX, the system assembler does not support the extended mnemonics
dcbtt and dcbtstt. This patch stops them from being emitted on
AIX and emits the base mnemonics instead, dcbt X, X, 16 and
dcbtstt X, X, 16 respectively.

Diff Detail

Event Timeline

Conanap created this revision.Oct 6 2021, 12:49 PM
Conanap requested review of this revision.Oct 6 2021, 12:49 PM
jsji accepted this revision as: jsji.Oct 6 2021, 12:58 PM

Thanks for working on this.

llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
161–164

What do you mean by still requires dcbtt and dcbtstt implementation?

164

I think it is better to use the same condition as ModernAs Predicate , so that we may be able to enable it with feature bit if needed.

(!TT.isOSAIX() || STI.getFeatureBits()[PPC::HasModernAIXAs])
This revision is now accepted and ready to land.Oct 6 2021, 12:58 PM

Please change the condition as Jinsong suggested and change the leading comment to:

// On AIX, only emit the extended mnemonics for dcbt and dcbtst if
// the "modern assembler" is available.
Conanap updated this revision to Diff 378015.Oct 7 2021, 2:46 PM
Conanap marked 2 inline comments as done.

Added mordern assembler check

nemanjai accepted this revision.Oct 8 2021, 8:40 AM

LGTM. This is already approved, but just wanted to indicate that I think the comments were addressed adequately.