diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2015-04-23 20:31:22 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-04-23 20:31:22 +0000 |
| commit | 1213918bf471e20ec537c95b54b82f5286b1ceae (patch) | |
| tree | 7d9c01b48400d80eaca2c9c77b9e2669b6dc75a2 /llvm/test/CodeGen/ARM/thumb-alignment.ll | |
| parent | e5689679869fb5b46b462cddbbad9867016110eb (diff) | |
| download | bcm5719-llvm-1213918bf471e20ec537c95b54b82f5286b1ceae.tar.gz bcm5719-llvm-1213918bf471e20ec537c95b54b82f5286b1ceae.zip | |
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
llvm-svn: 235636
Diffstat (limited to 'llvm/test/CodeGen/ARM/thumb-alignment.ll')
| -rw-r--r-- | llvm/test/CodeGen/ARM/thumb-alignment.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/thumb-alignment.ll b/llvm/test/CodeGen/ARM/thumb-alignment.ll new file mode 100644 index 00000000000..d2565098798 --- /dev/null +++ b/llvm/test/CodeGen/ARM/thumb-alignment.ll @@ -0,0 +1,15 @@ +; RUN: llc -relocation-model=pic -mtriple=thumbv7-unknown-linux -o - %s | FileCheck %s + +@x = external global i32 + +; CHECK: .globl foo +; CHECK-NEXT: .align 2 +define i32* @foo() { + ret i32* @x +} + +; CHECK: .globl bar +; CHECK-NEXT: .align 1 +define i32* @bar() { + ret i32* zeroinitializer +} |

