[PATCH] D96097: [TargetLowering] Use Align in allowsMisalignedMemoryAccesses.

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 00:42:11 PST 2021


gchatelet added a comment.

I had a similar patch - D82876 <https://reviews.llvm.org/D82876> - but it never went through...
Thx for working on this!

I believe this patch will break the VE experimental target. Modifications to the following files are missing

  llvm/lib/Target/VE/VEISelLowering.h
  llvm/lib/Target/VE/VEISelLowering.cpp



================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:6938
             TLI.getValueType(DL, ST->getValueOperand()->getType()), AS,
-            Align)) {
+            Alignment)) {
       // If this is not supported, there is no way we can combine
----------------
This could be inlined AFAICT


================
Comment at: llvm/lib/Target/AMDGPU/R600ISelLowering.cpp:1658
 
-  return VT.bitsGT(MVT::i32) && Align % 4 == 0;
+  return VT.bitsGT(MVT::i32) && Alignment.value() % 4 == 0;
 }
----------------
This can be turned into `Alignment >= Align(4)` which I believe is clearer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96097



More information about the llvm-commits mailing list