[TextAPI] Remove a superfluous semicolon, fixing GCC warnings. NFC.
[llvm-core.git] / test / DebugInfo / debugify-each.ll
blobe290b948cc76d5720169caf9c793175cae7569ac
1 ; RUN: opt -debugify-each -O3 -S -o /dev/null < %s 2> %t
2 ; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS
3 ; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS
5 ; RUN: opt -enable-debugify -debugify-each -O3 -S -o /dev/null < %s 2> %t
6 ; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS
7 ; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS
9 ; RUN: opt -debugify-each -instrprof -instrprof -sroa -sccp -S -o /dev/null < %s 2> %t
10 ; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS
11 ; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS
13 ; Verify that debugify each can be safely used with piping
14 ; RUN: opt -debugify-each -O1 < %s | opt -O2 -o /dev/null
16 ; Check that the quiet mode emits no messages.
17 ; RUN: opt -disable-output -debugify-quiet -debugify-each -O1 < %s 2>&1 | count 0
19 ; Check that stripped textual IR compares equal before and after applying
20 ; debugify.
21 ; RUN: opt -O1 < %s -S -o - | \
22 ; RUN:   opt -strip -strip-dead-prototypes -strip-named-metadata -S -o %t.before
23 ; RUN: opt -O1 -debugify-each < %s -S -o - | \
24 ; RUN:   opt -strip -strip-dead-prototypes -strip-named-metadata -S -o %t.after
25 ; RUN: diff %t.before %t.after
27 ; Check that stripped IR compares equal before and after applying debugify.
28 ; RUN: opt -O1 < %s | \
29 ; RUN:   opt -strip -strip-dead-prototypes -strip-named-metadata | \
30 ; RUN:   llvm-dis -o %t.before
31 ; RUN: opt -O1 -debugify-each < %s | \
32 ; RUN:   opt -strip -strip-dead-prototypes -strip-named-metadata | \
33 ; RUN:   llvm-dis -o %t.after
34 ; RUN: diff %t.before %t.after
36 define void @foo(i32 %arg) {
37   call i32 asm "bswap $0", "=r,r"(i32 %arg)
38   ret void
41 define void @bar() {
42   ret void
45 ; Verify that the module & function (check-)debugify passes run at least twice.
47 ; MODULE-PASS: CheckModuleDebugify [{{.*}}]
48 ; MODULE-PASS: CheckModuleDebugify [{{.*}}]
50 ; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]
51 ; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]
52 ; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]
53 ; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]