[PATCH] D142874: [LoongArch] Implement TargetLowering::isLegalAddressingMode() hook
Gong LingQin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 03:51:47 PST 2023
gonglingqin added inline comments.
================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:3148
+ case 2:
+ // "2*r+r" or "2*r+i" is not allowed.
+ if (AM.HasBaseReg || AM.BaseOffs)
----------------
xen0n wrote:
> xen0n wrote:
> > Isn't `k*r+r` entirely expressible with `alsl` in case of `k in (2, 4, 8, 16 if LA64)`? You may want to implement it this time, but I'm fine either way.
> Hmm, I haven't dug any deeper but if this predicate only governs actions that end up with a `ld/st` then please ignore my comment.
Thank you for your review! As explained in https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/TargetLowering.h#L2600-L2607, this predicate only governs actions that end up with a load/store.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142874/new/
https://reviews.llvm.org/D142874
More information about the llvm-commits
mailing list