aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:17:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:17:04 +0000
commitb915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch)
tree98b8f811c7aff2547cab8642daf372d6c59502fb /test/CodeGen/Generic
parent6421cca32f69ac849537a3cff78c352195e99f1b (diff)
Notes
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r--test/CodeGen/Generic/MachineBranchProb.ll5
-rw-r--r--test/CodeGen/Generic/intrinsics.ll7
-rw-r--r--test/CodeGen/Generic/llc-start-stop.ll35
-rw-r--r--test/CodeGen/Generic/stop-after.ll11
4 files changed, 46 insertions, 12 deletions
diff --git a/test/CodeGen/Generic/MachineBranchProb.ll b/test/CodeGen/Generic/MachineBranchProb.ll
index e70215049995..921fa62c1c43 100644
--- a/test/CodeGen/Generic/MachineBranchProb.ll
+++ b/test/CodeGen/Generic/MachineBranchProb.ll
@@ -1,9 +1,12 @@
; RUN: llc < %s -print-machineinstrs=expand-isel-pseudos -o /dev/null 2>&1 | FileCheck %s
; ARM & AArch64 run an extra SimplifyCFG which disrupts this test.
-; Hexagon crashes (PR23377)
; XFAIL: arm,aarch64
+; Hexagon runs passes that renumber the basic blocks, causing this test
+; to fail.
+; XFAIL: hexagon
+
; Make sure we have the correct weight attached to each successor.
define i32 @test2(i32 %x) nounwind uwtable readnone ssp {
; CHECK-LABEL: Machine code for function test2:
diff --git a/test/CodeGen/Generic/intrinsics.ll b/test/CodeGen/Generic/intrinsics.ll
index 29bc499adfc5..4d04786a58d4 100644
--- a/test/CodeGen/Generic/intrinsics.ll
+++ b/test/CodeGen/Generic/intrinsics.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s
+; RUN: llc -O0 < %s
;; SQRT
declare float @llvm.sqrt.f32(float)
@@ -38,3 +39,9 @@ define double @test_cos(float %F) {
ret double %I
}
+declare i8* @llvm.invariant.group.barrier(i8*)
+
+define i8* @barrier(i8* %p) {
+ %q = call i8* @llvm.invariant.group.barrier(i8* %p)
+ ret i8* %q
+}
diff --git a/test/CodeGen/Generic/llc-start-stop.ll b/test/CodeGen/Generic/llc-start-stop.ll
new file mode 100644
index 000000000000..7508f94c50a9
--- /dev/null
+++ b/test/CodeGen/Generic/llc-start-stop.ll
@@ -0,0 +1,35 @@
+; RUN: llc < %s -debug-pass=Structure -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP-AFTER
+; STOP-AFTER: -loop-reduce
+; STOP-AFTER: Dominator Tree Construction
+; STOP-AFTER: Loop Strength Reduction
+; STOP-AFTER-NEXT: MIR Printing Pass
+
+; RUN: llc < %s -debug-pass=Structure -stop-before=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP-BEFORE
+; STOP-BEFORE-NOT: -loop-reduce
+; STOP-BEFORE: Dominator Tree Construction
+; STOP-BEFORE-NOT: Loop Strength Reduction
+
+; RUN: llc < %s -debug-pass=Structure -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START-AFTER
+; START-AFTER: -machine-branch-prob -pre-isel-intrinsic-lowering
+; START-AFTER: FunctionPass Manager
+; START-AFTER-NEXT: Lower Garbage Collection Instructions
+
+; RUN: llc < %s -debug-pass=Structure -start-before=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START-BEFORE
+; START-BEFORE: -machine-branch-prob -pre-isel-intrinsic-lowering
+; START-BEFORE: FunctionPass Manager
+; START-BEFORE: Loop Strength Reduction
+; START-BEFORE-NEXT: Lower Garbage Collection Instructions
+
+; RUN: not llc < %s -start-before=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-START-BEFORE
+; RUN: not llc < %s -stop-before=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-STOP-BEFORE
+; RUN: not llc < %s -start-after=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-START-AFTER
+; RUN: not llc < %s -stop-after=nonexistent -o /dev/null 2>&1 | FileCheck %s -check-prefix=NONEXISTENT-STOP-AFTER
+; NONEXISTENT-START-BEFORE: start-before pass is not registered.
+; NONEXISTENT-STOP-BEFORE: stop-before pass is not registered.
+; NONEXISTENT-START-AFTER: start-after pass is not registered.
+; NONEXISTENT-STOP-AFTER: stop-after pass is not registered.
+
+; RUN: not llc < %s -start-before=loop-reduce -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=DOUBLE-START
+; RUN: not llc < %s -stop-before=loop-reduce -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=DOUBLE-STOP
+; DOUBLE-START: -start-before and -start-after specified!
+; DOUBLE-STOP: -stop-before and -stop-after specified!
diff --git a/test/CodeGen/Generic/stop-after.ll b/test/CodeGen/Generic/stop-after.ll
deleted file mode 100644
index 07a60f7381ab..000000000000
--- a/test/CodeGen/Generic/stop-after.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: llc < %s -debug-pass=Structure -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP
-; RUN: llc < %s -debug-pass=Structure -start-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=START
-
-; STOP: -loop-reduce
-; STOP: Loop Strength Reduction
-; STOP-NEXT: Machine Function Analysis
-; STOP-NEXT: MIR Printing Pass
-
-; START: -machine-branch-prob -pre-isel-intrinsic-lowering
-; START: FunctionPass Manager
-; START-NEXT: Lower Garbage Collection Instructions