[PATCH] D142874: [LoongArch] Implement TargetLowering::isLegalAddressingMode() hook

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 03:18:16 PST 2023


xen0n 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)
----------------
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.


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