reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
; RUN: opt -debugify-each -O3 -S -o /dev/null < %s 2> %t
; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS
; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS

; RUN: opt -enable-debugify -debugify-each -O3 -S -o /dev/null < %s 2> %t
; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS
; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS

; RUN: opt -debugify-each -instrprof -instrprof -sroa -sccp -S -o /dev/null < %s 2> %t
; RUN: FileCheck %s -input-file=%t -check-prefix=MODULE-PASS
; RUN: FileCheck %s -input-file=%t -check-prefix=FUNCTION-PASS

; Verify that debugify each can be safely used with piping
; RUN: opt -debugify-each -O1 < %s | opt -O2 -o /dev/null

; Check that the quiet mode emits no messages.
; RUN: opt -disable-output -debugify-quiet -debugify-each -O1 < %s 2>&1 | count 0

; Check that stripped textual IR compares equal before and after applying
; debugify.
; RUN: opt -O1 < %s -S -o - | \
; RUN:   opt -strip -strip-dead-prototypes -strip-named-metadata -S -o %t.before
; RUN: opt -O1 -debugify-each < %s -S -o - | \
; RUN:   opt -strip -strip-dead-prototypes -strip-named-metadata -S -o %t.after
; RUN: diff %t.before %t.after

; Check that stripped IR compares equal before and after applying debugify.
; RUN: opt -O1 < %s | \
; RUN:   opt -strip -strip-dead-prototypes -strip-named-metadata | \
; RUN:   llvm-dis -o %t.before
; RUN: opt -O1 -debugify-each < %s | \
; RUN:   opt -strip -strip-dead-prototypes -strip-named-metadata | \
; RUN:   llvm-dis -o %t.after
; RUN: diff %t.before %t.after

define void @foo(i32 %arg) {
  call i32 asm "bswap $0", "=r,r"(i32 %arg)
  ret void
}

define void @bar() {
  ret void
}

; Verify that the module & function (check-)debugify passes run at least twice.

; MODULE-PASS: CheckModuleDebugify [{{.*}}]
; MODULE-PASS: CheckModuleDebugify [{{.*}}]

; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]
; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]
; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]
; FUNCTION-PASS: CheckFunctionDebugify [{{.*}}]