ARM: Only enforce 4-byte alignment on Thumb-2 functions with constant pools.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 23 Apr 2015 20:31:22 +0000 (20:31 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 23 Apr 2015 20:31:22 +0000 (20:31 +0000)
commitb28abbf98b185ded306579cb4db75366274d593a
treeafff1f666014791cbb514802f237daa1aad5ec63
parentab740d1e40744b0c2bb4ce81de663022700bd1b3
ARM: Only enforce 4-byte alignment on Thumb-2 functions with constant pools.

This appears to have been introduced back in r76698 as part of an unrelated
change. I can find no official ARM documentation stating that Thumb-2 functions
require 4-byte alignment; in fact, ARM documentation appears to contradict
this (see, e.g., ARM Architecture Reference Manual Thumb-2 Supplement,
section 2.6.1: "Thumb-2 enforces 16-bit alignment on all instructions.").

Also remove code that sets alignment for ARM functions, which is redundant
with code in the MachineFunction constructor, and remove the hidden
-arm-align-constant-islands flag, which has been enabled by default since
r146739 (Dec 2011) and has probably received sufficient testing by now.

Differential Revision: http://reviews.llvm.org/D9138

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235636 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMConstantIslandPass.cpp
test/CodeGen/ARM/thumb-alignment.ll [new file with mode: 0644]
test/MC/ARM/elf-thumbfunc-reloc.ll