[PATCH] D40405: Fix incorrect handling of unsized / void types in SITargetLowering::isLegalAddressingMode

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 15 14:10:49 PDT 2018


rampitec added inline comments.
Herald added a subscriber: llvm-commits.


================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:679
     // alignment here.
-    if (DL.getTypeStoreSize(Ty) < 4)
+    if (Ty->isSized() && DL.getTypeStoreSize(Ty) < 4)
       return isLegalGlobalAddressingMode(AM);
----------------
I would prefer to exit earlier than this. It is not address space specific and we hardly can do anything good on a void or opaque type.


Repository:
  rL LLVM

https://reviews.llvm.org/D40405





More information about the llvm-commits mailing list