Skip to content

Commit

Permalink
[Alignment] fix dubious min function alignment
Browse files Browse the repository at this point in the history
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

llvm-svn: 371204
  • Loading branch information
gchatelet committed Sep 6, 2019
1 parent 8455294 commit 5d870c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM,
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);

Expand Down

0 comments on commit 5d870c2

Please sign in to comment.