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 4; RUN: opt -disable-output -debugify-each -passes='default<O3>' %s 2> %t 5; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS 6; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS 7 8; RUN: opt -enable-debugify -debugify-each -O3 -S -o /dev/null < %s 2> %t 9; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS 10; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS 11 12; RUN: opt -debugify-each -instrprof -instrprof -sroa -sccp -S -o /dev/null < %s 2> %t 13; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS 14; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS 15 16; Verify that debugify each can be safely used with piping 17; RUN: opt -debugify-each -O1 < %s | opt -O2 -o /dev/null 18 19; Check that the quiet mode emits no messages. 20; RUN: opt -disable-output -debugify-quiet -debugify-each -O1 < %s 2>&1 | count 0 21 22; Check that stripped textual IR compares equal before and after applying 23; debugify. 24; RUN: opt -O1 < %s -S -o %t.before 25; RUN: opt -O1 -debugify-each < %s -S -o %t.after 26; RUN: diff %t.before %t.after 27 28; Check that stripped IR compares equal before and after applying debugify. 29; RUN: opt -O1 < %s | llvm-dis -o %t.before 30; RUN: opt -O1 -debugify-each < %s | llvm-dis -o %t.after 31; RUN: diff %t.before %t.after 32 33define void @foo(i32 %arg) { 34 call i32 asm "bswap $0", "=r,r"(i32 %arg) 35 ret void 36} 37 38define void @bar() { 39 ret void 40} 41 42; Verify that the module & function (check-)debugify passes run at least twice. 43 44; MODULE-PASS: CheckModuleDebugify [{{.*}}] 45; MODULE-PASS: CheckModuleDebugify [{{.*}}] 46 47; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}] 48; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}] 49; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}] 50; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}] 51