1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/CodeGen/Generic/print-machineinstrs.ll
Jonas Paulsson 13d4242b40 [SystemZ] Fix trap issue and enable expensive checks.
The isBarrier/isTerminator flags have been removed from the SystemZ trap
instructions, so that tests do not fail with EXPENSIVE_CHECKS. This was just
an issue at -O0 and did not affect code output on benchmarks.

(Like Eli pointed out: "targets are split over whether they consider their
"trap" a terminator; x86, AArch64, and NVPTX don't, but ARM, MIPS, PPC, and
SystemZ do. We should probably try to be consistent here.". This is still the
case, although SystemZ has switched sides).

SystemZ now returns true in isMachineVerifierClean() :-)

These Generic tests have been modified so that they can be run with or without
EXPENSIVE_CHECKS: CodeGen/Generic/llc-start-stop.ll and
CodeGen/Generic/print-machineinstrs.ll

Review: Ulrich Weigand, Simon Pilgrim, Eli Friedman
https://bugs.llvm.org/show_bug.cgi?id=33047
https://reviews.llvm.org/D34143

llvm-svn: 306106
2017-06-23 14:30:46 +00:00

28 lines
1.2 KiB
LLVM

; 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 {
; 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
ret i64 %e
}