[PATCH] D88865: [GISel] Add combine for constant G_PTR_ADD offsets.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 22:28:24 PDT 2020


aemerson accepted this revision.
aemerson added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-ptradd-int2ptr.mir:16
+    %2:_(s32) = G_CONSTANT i32 2
+    %3:_(p64) = G_INTTOPTR %2
+    %4:_(p64) = G_PTR_ADD %3, %1
----------------
FYI the integer in `p64` doesn't mean the same thing as in `s64`. In `s64` its the bit width, in `p64` the integer denotes the address space of the pointer. We normally just use the default p0 on AArch64 because we only use one address space. It doesn't make a difference for this combine though.


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

https://reviews.llvm.org/D88865



More information about the llvm-commits mailing list