[PATCH] D74486: [PowerPC][Future] Add initial support for PC Relative addressing for constant pool loads
Anil Mahmud via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 14:06:42 PDT 2020
anil9 added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPC.h:102
+ /// MO_PCREL_FLAG - If this bit is set, the symbol reference is relative to
+ /// the current instruction address(pc), e.g., var at pcrel. Fixup is VK_PCREL.
+ MO_PCREL_FLAG = 16,
----------------
"Fixup is VK_PCREL". or is it the variant kind ?
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:2319
+ // If we have a PC Relative target flag don't select as [reg+reg]. It will be
+ // a [pc+imm].
+ if (SelectAddressPCRel(N, Base))
----------------
In the comment above the function it says when it returns false, now that you have another condition when it returns false I think you should update the comment.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:2405
/// a signed 16-bit displacement [r+imm], and if it is not better
/// represented as reg+reg. If \p EncodingAlignment is non-zero, only accept
/// displacements that are multiples of that value.
----------------
Update the comment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74486/new/
https://reviews.llvm.org/D74486
More information about the llvm-commits
mailing list