[llvm] r371204 - [Alignment] fix dubious min function alignment

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


Author: gchatelet
Date: Fri Sep  6 06:54:09 2019
New Revision: 371204

URL: http://llvm.org/viewvc/llvm-project?rev=371204&view=rev
Log:
[Alignment] fix dubious min function alignment

Summary:
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.

Reviewers: uweigand

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67271

Modified:
    llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp

Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=371204&r1=371203&r2=371204&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Fri Sep  6 06:54:09 2019
@@ -120,7 +120,7 @@ SystemZTargetLowering::SystemZTargetLowe
   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);
 




More information about the llvm-commits mailing list