[PATCH] D155600: [AIX][TLS] Produce a faster local-exec access sequence with -maix-small-local-exec-tls (And optimize when load/store offsets are 0)
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 05:41:40 PDT 2023
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:7621-7622
// For these cases, the immediate may not be divisible by 4, in
// which case the fold is illegal for DS-form instructions. (The
// other cases provide aligned addresses and are always safe.)
+ if (RequiresMod4Offset && !HasAIXSmallLocalExecTLS &&
----------------
The comment is out-of-date given the number of `RequiresMod4Offset` checks in the function. It seems the comment is bolstering the legitimacy of outdated code. The check on `dyn_cast<ConstantSDNode>(ImmOpnd)` further below seems to be a better version of the code here. Perhaps the code here should just be removed?
================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:7697
// requirements.
if (auto *C = dyn_cast<ConstantSDNode>(ImmOpnd)) {
Offset += C->getSExtValue();
----------------
Note: Looks like better version of the code is here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155600/new/
https://reviews.llvm.org/D155600
More information about the llvm-commits
mailing list