[MC] Use .p2align instead of .align
For historic reasons, the behavior of .align differs between targets.
Fortunately, there are alternatives, .p2align and .balign, which make the
interpretation of the parameter explicit, and which behave consistently across
targets.
This patch teaches MC to use .p2align instead of .align, so that people reading
code for multiple architectures don't have to remember which way each platform
does its .align directive.
Differential Revision: http://reviews.llvm.org/D16549
llvm-svn: 258750
diff --git a/llvm/test/CodeGen/ARM/thumb-alignment.ll b/llvm/test/CodeGen/ARM/thumb-alignment.ll
index b9ddfbb..8e894d2 100644
--- a/llvm/test/CodeGen/ARM/thumb-alignment.ll
+++ b/llvm/test/CodeGen/ARM/thumb-alignment.ll
@@ -3,13 +3,13 @@
@x = external global i32
; CHECK: .globl foo
-; CHECK-NEXT: .align 2
+; CHECK-NEXT: .p2align 2
define i32* @foo() {
ret i32* @x
}
; CHECK: .globl bar
-; CHECK-NEXT: .align 1
+; CHECK-NEXT: .p2align 1
define i32* @bar() {
ret i32* zeroinitializer
}
@@ -22,7 +22,7 @@
; Create a Thumb-2 jump table, which should force alignment to 4 bytes.
; CHECK: .globl baz
-; CHECK-NEXT: .align 2
+; CHECK-NEXT: .p2align 2
; CHECK: tbb
define i32 @baz() {
%1 = load i32, i32* @c, align 4