[PATCH] D55115: [IR] Don't assume all functions are 4 byte aligned
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 11:35:28 PST 2018
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM with formatting fixed.
================
Comment at: lib/IR/ConstantFold.cpp:1081
- // Functions are at least 4-byte aligned.
- unsigned GVAlign = GV->getAlignment();
- if (isa<Function>(GV))
- GVAlign = std::max(GVAlign, 4U);
+ unsigned GVAlign = GV->getPointerAlignment(GV->getParent()->getDataLayout());
----------------
80 columns.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55115/new/
https://reviews.llvm.org/D55115
More information about the llvm-commits
mailing list