aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/code-align.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
commit01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch)
tree4def12e759965de927d963ac65840d663ef9d1ea /test/CodeGen/PowerPC/code-align.ll
parentf0f4822ed4b66e3579e92a89f368f8fb860e218e (diff)
Notes
Diffstat (limited to 'test/CodeGen/PowerPC/code-align.ll')
-rw-r--r--test/CodeGen/PowerPC/code-align.ll60
1 files changed, 51 insertions, 9 deletions
diff --git a/test/CodeGen/PowerPC/code-align.ll b/test/CodeGen/PowerPC/code-align.ll
index 19d1b236ce0df..a6fd374210643 100644
--- a/test/CodeGen/PowerPC/code-align.ll
+++ b/test/CodeGen/PowerPC/code-align.ll
@@ -22,9 +22,9 @@ entry:
; GENERIC-LABEL: .globl foo
; BASIC-LABEL: .globl foo
; PWR-LABEL: .globl foo
-; GENERIC: .align 2
-; BASIC: .align 4
-; PWR: .align 4
+; GENERIC: .p2align 2
+; BASIC: .p2align 4
+; PWR: .p2align 4
; GENERIC: @foo
; BASIC: @foo
; PWR: @foo
@@ -41,9 +41,9 @@ entry:
; GENERIC: mtctr
; BASIC: mtctr
; PWR: mtctr
-; GENERIC-NOT: .align
-; BASIC: .align 4
-; PWR: .align 4
+; GENERIC-NOT: .p2align
+; BASIC: .p2align 4
+; PWR: .p2align 4
; GENERIC: lwzu
; BASIC: lwzu
; PWR: lwzu
@@ -83,9 +83,9 @@ entry:
; GENERIC: mtctr
; BASIC: mtctr
; PWR: mtctr
-; GENERIC-NOT: .align
-; BASIC: .align 4
-; PWR: .align 5
+; GENERIC-NOT: .p2align
+; BASIC: .p2align 4
+; PWR: .p2align 5
; GENERIC: bdnz
; BASIC: bdnz
; PWR: bdnz
@@ -105,6 +105,48 @@ for.end: ; preds = %for.body
ret void
}
+; Function Attrs: nounwind
+define void @test_minsize(i32 signext %x, i32* nocapture %a) #2 {
+entry:
+ br label %vector.body
+
+; GENERIC-LABEL: @test_minsize
+; BASIC-LABEL: @test_minsize
+; PWR-LABEL: @test_minsize
+; GENERIC: mtctr
+; BASIC: mtctr
+; PWR: mtctr
+; GENERIC-NOT: .p2align
+; BASIC-NOT: .p2align
+; PWR-NOT: .p2align
+; GENERIC: lwzu
+; BASIC: lwzu
+; PWR: lwzu
+; GENERIC: bdnz
+; BASIC: bdnz
+; PWR: bdnz
+
+vector.body: ; preds = %vector.body, %entry
+ %index = phi i64 [ 0, %entry ], [ %index.next, %vector.body ]
+ %induction45 = or i64 %index, 1
+ %0 = getelementptr inbounds i32, i32* %a, i64 %index
+ %1 = getelementptr inbounds i32, i32* %a, i64 %induction45
+ %2 = load i32, i32* %0, align 4
+ %3 = load i32, i32* %1, align 4
+ %4 = add nsw i32 %2, 4
+ %5 = add nsw i32 %3, 4
+ %6 = mul nsw i32 %4, 3
+ %7 = mul nsw i32 %5, 3
+ store i32 %6, i32* %0, align 4
+ store i32 %7, i32* %1, align 4
+ %index.next = add i64 %index, 2
+ %8 = icmp eq i64 %index.next, 2048
+ br i1 %8, label %for.end, label %vector.body
+
+for.end: ; preds = %vector.body
+ ret void
+}
attributes #0 = { nounwind readnone }
attributes #1 = { nounwind }
+attributes #2 = { nounwind minsize}