[PATCH] D60677: [ARM] Rewrite isLegalT2AddressImmediate

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 02:52:17 PDT 2019


t.p.northover accepted this revision.
t.p.northover added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks for updating it.



================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:13305-13307
+  uint64_t NumBytes = 0;
+  if (VT.isInteger() || VT.isFloatingPoint())
+    NumBytes = VT.getSizeInBits() / 8;
----------------
dmgreen wrote:
> t.p.northover wrote:
> > Early exit would probably be nicer here (if invalid type, return false immediately), and I think it can go at the very top of the function too.
> > 
> > Also, I believe this is incorrect for `i1` (ends up with `NumBytes == 0`).
> > 
> > Finally, this expands the function to cover vector types too. Is that intentional?
> I was originally going to say that MVE will be coming soon (you may have seen), and I would follow up then, but my understanding is that Neon types do not have immediates like these. I've had it return false on vectors, so the T32 results of testvecs in gep.ll have not changed.
Oh yes, sorry. I got too focused on the code and ignored the context.


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

https://reviews.llvm.org/D60677





More information about the llvm-commits mailing list