[PATCH] D60677: [ARM] Rewrite isLegalT2AddressImmediate

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 09:41:32 PDT 2019


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:13305-13307
+  uint64_t NumBytes = 0;
+  if (VT.isInteger() || VT.isFloatingPoint())
+    NumBytes = VT.getSizeInBits() / 8;
----------------
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.


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

https://reviews.llvm.org/D60677





More information about the llvm-commits mailing list