As per MaxAlignmentExponent alignment is not allowed to be more than 2^29.
Encoded as Log2, this means that storing alignment uses 5 bits.
This patch makes sure all instructions store their alignment in a consistent way, encoded as Log2 and using 5 bits.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/IR/Instruction.h | ||
---|---|---|
59 | I've reworded it a bit. I hope you don't mind. |
Add comment: // Align(1) is stored as 0. Valid alignments are powers of two from 2^0 to 2^MaxAlignmentExponent = 2^29, so we need 5 bits to encode the 30 possible values.