[ARM] Use preferred alignment for constants in promoteToConstantPool.
authorEli Friedman <efriedma@codeaurora.org>
Fri, 28 Sep 2018 20:21:51 +0000 (20:21 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Fri, 28 Sep 2018 20:21:51 +0000 (20:21 +0000)
commitbb993be56bb38e46c029b682f67fd1b7dc4b9111
tree162f6e76725f729cea3d11655706e9c73de44414
parentb62f73420b91a430e68f60fee350e2a603d91d6f
[ARM] Use preferred alignment for constants in promoteToConstantPool.

This mostly affects IR generated by non-clang frontends because clang
generally sets the alignment of globals explicitly.

Fixes https://bugs.llvm.org//show_bug.cgi?id=32394 .

(-arm-promote-constant is currently off by default, and it stays off
with this patch. I'll look into turning it on again when all the known
issues are fixed.)

Differential Revision: https://reviews.llvm.org/D51469

llvm-svn: 343359
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/constantpool-promote.ll