[PATCH] D105676: [AArch64][GlobalISel] Relax oneuse restriction for PTR_ADD chain combining to check addressing legality.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 11:25:18 PDT 2021


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1731-1734
+    case TargetOpcode::G_LOAD:
+    case TargetOpcode::G_ZEXTLOAD:
+    case TargetOpcode::G_SEXTLOAD:
+    case TargetOpcode::G_STORE:
----------------
Also, we now have the `GLoadStore` wrapper class that can be used here with a `dyn_cast`.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1735
+    case TargetOpcode::G_STORE:
+      AccessTy = getTypeForLLT(MRI.getType(UseMI.getOperand(0).getReg()),
+                               MF.getFunction().getContext());
----------------
and this can then be replaced with `LdStMI.getReg(0)`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105676/new/

https://reviews.llvm.org/D105676



More information about the llvm-commits mailing list