brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · e9241de Raw
68 lines · plain
1; RUN: opt -debugify-each -O3 -S -o /dev/null < %s 2> %t2; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS3; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS4; RUN: opt -disable-output -debugify-each -passes='default<O3>' %s 2> %t5; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS6; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS7 8; RUN: opt -enable-debugify -debugify-each -O3 -S -o /dev/null < %s 2> %t9; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS10; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS11 12; RUN: opt -debugify-each -passes='instrprof,instrprof,sroa,sccp' -S -o /dev/null < %s 2> %t13; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS14; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS15 16; Verify that debugify each can be safely used with piping17; RUN: opt -debugify-each -O1 < %s | opt -O2 -o /dev/null18 19; Check that the quiet mode emits no messages.20; RUN: opt -disable-output -debugify-quiet -debugify-each -O1 < %s 2>&1 | count 021 22; Check that stripped textual IR compares equal before and after applying23; debugify.24; RUN: opt -O1 < %s -S -o %t.before25; RUN: opt -O1 -debugify-each < %s -S -o %t.after26; RUN: diff %t.before %t.after27 28; Check that stripped IR compares equal before and after applying debugify.29; RUN: opt -O1 < %s | llvm-dis -o %t.before30; RUN: opt -O1 -debugify-each < %s | llvm-dis -o %t.after31; RUN: diff %t.before %t.after32 33; Check that we only run debugify once per function per function pass.34; This ensures that we don't run it for pass managers/verifiers/printers.35; RUN: opt -debugify-each -passes=instsimplify -S -o /dev/null < %s 2> %t36; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS-ONE37 38; Check that we only run debugify once per module pass39; (plus the implicitly added begin/end verifier passes).40; RUN: opt -debugify-each -passes=globalopt -S -o /dev/null < %s 2> %t41; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS-ONE42 43define void @foo(i32 %arg) {44  call i32 asm "bswap $0", "=r,r"(i32 %arg)45  ret void46}47 48define void @bar() {49  ret void50}51 52; Verify that the module & function (check-)debugify passes run at least twice.53 54; MODULE-PASS: CheckModuleDebugify [{{.*}}]55; MODULE-PASS: CheckModuleDebugify [{{.*}}]56 57; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]58; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]59; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]60; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]61 62; MODULE-PASS-ONE: CheckModuleDebugify [{{.*}}]63; MODULE-PASS-ONE-NOT: CheckModuleDebugify [{{.*}}]64 65; FUNCTION-PASS-ONE: CheckFunctionDebugify [{{.*}}]66; FUNCTION-PASS-ONE: CheckFunctionDebugify [{{.*}}]67; FUNCTION-PASS-ONE-NOT: CheckFunctionDebugify [{{.*}}]68