summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r--test/CodeGen/Generic/llc-start-stop.ll5
-rw-r--r--test/CodeGen/Generic/print-machineinstrs.ll27
2 files changed, 24 insertions, 8 deletions
diff --git a/test/CodeGen/Generic/llc-start-stop.ll b/test/CodeGen/Generic/llc-start-stop.ll
index 49407fbb2d8..becd1cc453c 100644
--- a/test/CodeGen/Generic/llc-start-stop.ll
+++ b/test/CodeGen/Generic/llc-start-stop.ll
@@ -1,7 +1,10 @@
-; RUN: llc < %s -debug-pass=Structure -stop-after=loop-reduce -o /dev/null 2>&1 | FileCheck %s -check-prefix=STOP-AFTER
+; Note: -verify-machineinstrs is used in order to make this test compatible with EXPENSIVE_CHECKS.
+; RUN: llc < %s -debug-pass=Structure -stop-after=loop-reduce -verify-machineinstrs -o /dev/null 2>&1 \
+; RUN: | FileCheck %s -check-prefix=STOP-AFTER
; STOP-AFTER: -loop-reduce
; STOP-AFTER: Dominator Tree Construction
; STOP-AFTER: Loop Strength Reduction
+; STOP-AFTER-NEXT: Verify generated machine code
; 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
diff --git a/test/CodeGen/Generic/print-machineinstrs.ll b/test/CodeGen/Generic/print-machineinstrs.ll
index 26bccaae572..b33e0929edc 100644
--- a/test/CodeGen/Generic/print-machineinstrs.ll
+++ b/test/CodeGen/Generic/print-machineinstrs.ll
@@ -1,12 +1,25 @@
-; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs=branch-folder -o /dev/null 2>&1 | FileCheck %s
-; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs -o /dev/null 2>&1 | FileCheck %s
-; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs= -o /dev/null 2>&1 | FileCheck %s
+; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs=branch-folder -verify-machineinstrs -o /dev/null 2>&1 \
+; RUN: | FileCheck %s -check-prefix=PRINT-BRANCH-FOLD
+; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs -verify-machineinstrs -o /dev/null 2>&1 \
+; RUN: | FileCheck %s -check-prefix=PRINT
+; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs= -verify-machineinstrs -o /dev/null 2>&1 \
+; RUN: | FileCheck %s -check-prefix=PRINT
+
+; Note: -verify-machineinstrs is used in order to make this test compatible with EXPENSIVE_CHECKS.
define i64 @foo(i64 %a, i64 %b) nounwind {
-; CHECK: -branch-folder -machineinstr-printer
-; CHECK: Control Flow Optimizer
-; CHECK-NEXT: MachineFunction Printer
-; CHECK: Machine code for function foo:
+; PRINT-BRANCH-FOLD: -branch-folder -machineverifier -machineinstr-printer
+; PRINT-BRANCH-FOLD: Control Flow Optimizer
+; PRINT-BRANCH-FOLD-NEXT: Verify generated machine code
+; PRINT-BRANCH-FOLD-NEXT: MachineFunction Printer
+; PRINT-BRANCH-FOLD: Machine code for function foo:
+
+; PRINT: -branch-folder -machineinstr-printer
+; PRINT: Control Flow Optimizer
+; PRINT-NEXT: MachineFunction Printer
+; PRINT-NEXT: Verify generated machine code
+; PRINT: Machine code for function foo:
+
%c = add i64 %a, %b
%d = trunc i64 %c to i32
%e = zext i32 %d to i64