Fix alignment in AArch64InstructionSelector::emitConstantPoolEntry()
authorHans Wennborg <hans@hanshq.net>
Fri, 26 Apr 2019 08:31:00 +0000 (08:31 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 26 Apr 2019 08:31:00 +0000 (08:31 +0000)
commit5d5ee4aff748c827d54fa8c3224ad7090bb018bc
tree6788eb3044413ac22fd0851e2f7f80505ecf102e
parent1a607ff043fa06025f4d426b43dbb7c95744ce64
Fix alignment in AArch64InstructionSelector::emitConstantPoolEntry()

The code was using the alignment of a pointer to the value, not the
alignment of the constant itself.

Maybe we got away with it so far because the pointer alignment is
fairly high, but we did end up under-aligning <16 x i8> vectors,
which was caught in the Chromium build after lld stopped over-aligning
the .rodata.cst16 section in r356428. (See crbug.com/953815)

Differential revision: https://reviews.llvm.org/D61124

llvm-svn: 359287
llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/select-shuffle-vector.mir