[PATCH] D67271: [Alignment] fix dubious min function alignment

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 06:06:16 PDT 2019


gchatelet created this revision.
gchatelet added a reviewer: uweigand.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

This was discovered while introducing the llvm::Align type.
The original setMinFunctionAlignment used to take alignment as log2, looking at the comment it seems like instructions are to be 2-bytes aligned and not 4-bytes aligned.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67271

Files:
  llvm/lib/Target/SystemZ/SystemZISelLowering.cpp


Index: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
===================================================================
--- llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -120,7 +120,7 @@
   setBooleanVectorContents(ZeroOrNegativeOneBooleanContent);
 
   // Instructions are strings of 2-byte aligned 2-byte values.
-  setMinFunctionAlignment(llvm::Align(4));
+  setMinFunctionAlignment(llvm::Align(2));
   // For performance reasons we prefer 16-byte alignment.
   setPrefFunctionLogAlignment(4);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67271.219081.patch
Type: text/x-patch
Size: 559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190906/9d31c15d/attachment.bin>


More information about the llvm-commits mailing list