xiangzhangllvm added a comment. In D70157#1746793 <https://reviews.llvm.org/D70157#1746793>, @MaskRay wrote:
> On x86, the preferred function alignment is 16 > (https://github.com/llvm/llvm-project/blob/arcpatch-D70157/llvm/lib/Target/X86/X86ISelLowering.cpp#L1893), > which is the default function alignment in text sections. If the > cross-boundary decision is made with alignment=32 > (--x86-align-branch-boundary=32) in mind, and the section alignment is still > 16 (not increased to 32 or higher), the linker may place the section at an > address which equals 16 modulo 32, the section contents will thus shift by > 16. The instructions that do not cross the boundary in the object files may > cross the boundary in the linker output. Have you considered increasing the > section alignment to 32? > > Shall we default to -mbranches-within-32B-boundaries if the specified -march= > or -mtune= may be affected by the erratum? Hi Fangrui, Here will set the section alignment to 32, llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:658 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70157/new/ https://reviews.llvm.org/D70157 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits