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