Skip to content

[RemoveDIs] Fix rotten --implicit-check-not lines #144711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RUN: llc -run-pass=mir-debugify -o - %s | FileCheck --check-prefixes=ALL,VALUE %s
# RUN: llc -run-pass=mir-debugify -debugify-level=locations -o - %s | FileCheck --check-prefixes=ALL --implicit-check-not=dbg.value %s
# RUN: llc -run-pass=mir-debugify -debugify-level=locations -o - %s | FileCheck --check-prefixes=ALL --implicit-check-not=dbg_value %s
# RUN: llc -run-pass=mir-debugify,mir-strip-debug,mir-debugify -o - %s | FileCheck --check-prefixes=ALL,VALUE %s
# RUN: llc -run-pass=mir-debugify,mir-strip-debug -o - %s | FileCheck --check-prefix=STRIP %s

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; REQUIRES: x86-registered-target
; RUN: llc -start-before=codegenprepare -stop-after=codegenprepare \
; RUN: -mtriple=x86_64-unknown-unknown %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg."
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Check that when CodeGenPrepare moves an address computation to a block it's
;; used in its dbg.assign uses are updated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt %s -S -passes=dse -o - | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: opt %s -S -passes=dse -o - | FileCheck %s --implicit-check-not="#dbg_"

;; Observed in the wild, but test is created by running memcpyopt on
;; assignment-tracking/memcpyopt/merge-stores.ll then manually inserting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt %s -S -passes=dse -o - | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: opt %s -S -passes=dse -o - | FileCheck %s --implicit-check-not="#dbg_"

;; Based on the test shorten.ll with some adjustments.
;;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S %s -passes=inline -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; The dbg.assign linked to the large alloca describes a variable sitting at
;; offset 0, size 64. Check:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=instcombine -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Based on the test remove-redundant-dbg.ll.
;;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Check that sroa removes redundant debug intrinsics after it makes a
;; change. This has a significant positive impact on peak memory and compiler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %s -passes=loop-vectorize -force-vector-width=2 -force-vector-interleave=2 -S -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Check that loop-vectorize removes redundant debug intrinsics after it makes
;; a change. This has a significant positive impact on peak memory and compiler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=mem2reg -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Test assignment tracking debug info when mem2reg promotes an alloca with
;; stores requiring insertion of a phi. Check the output when the stores are
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=mem2reg -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Test assignment tracking debug info when mem2reg promotes a single-block
;; alloca. Check the output when the stores are tagged and also untagged (test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=mem2reg -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Test assignment tracking debug info when mem2reg promotes a single-store
;; alloca. Additionally, check that all the dbg.assigns linked to the alloca
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -passes=mem2reg -S %s -o - | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: opt -passes=mem2reg -S %s -o - | FileCheck %s --implicit-check-not="#dbg_"

; CHECK: #dbg_value(i64 0, ![[#]], !DIExpression(DW_OP_LLVM_fragment, 0, 32),

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/DebugInfo/Generic/assignment-tracking/optnone.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S %s -o - --passes=declare-to-assign \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Assignment tracking doesn't add any value when optimisations are disabled.
;; Check it doesn't get applied to functions marked optnone.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=redundant-dbg-inst-elim -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; $ cat -n reduce.c
;; 1 void ext();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=redundant-dbg-inst-elim -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Hand-written. Test how RemoveRedundantDbgInstrs interacts with dbg.assign
;; intrinsics. FileCehck directives are inline.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %s -S -o - -passes=instcombine \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Hand-written (the debug info doesn't necessarily make sense and isn't fully
;; formed). Test salvaging a dbg.assign value and address. Checks and comments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa,verify -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

; Check that single sliced allocas retain their assignment tracking debug info.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa -S -o - %s \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"
;
;; Based on llvm/test/DebugInfo/ARM/sroa-complex.ll
;; generated from:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Check that a dbg.assign for a promoted variable becomes a kill location if
;; it used a fragment that can't be split (the first check directive below).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa,verify -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Check that the new slices of an alloca and memcpy intructions get dbg.assign
;; intrinsics with the correct fragment info.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Check that sroa removes redundant debug intrinsics after it makes a
;; change. This has a significant positive impact on peak memory and compiler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa,verify -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

; Check that the new slices of an alloca and memset intructions get dbg.assign
; intrinsics with the correct fragment info. Ensure that only the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S -passes=sroa -sroa-skip-mem2reg %s \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; NOTE: This is the same as split-pre-fragmented-store.ll except the base
;; alloca's dbg.assign has been altered to contain a fragment of the full
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S -passes=sroa -sroa-skip-mem2reg %s \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; IR hand-modified, originally generated from:
;; struct Pair { int a; int b; };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa,verify -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

; Check that the new slices of an alloca and memset intructions get dbg.assign
; intrinsics with the correct fragment info. Ensure that only the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=sroa -S %s -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; Check that the fragments generated in SROA for a split alloca that has a
;; dbg.assign with non-zero-offset fragment are correct.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes='declare-to-assign,verify' %s -S -o - \
; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
; RUN: | FileCheck %s --implicit-check-not="#dbg_"

;; This test checks that `trackAssignments` is working correctly by using the
;; pass-wrapper `declare-to-assign`. Each function checks some specific
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/DebugInfo/Generic/inline-alloca-ordering.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt %s --passes=inline -o - -S | FileCheck %s --implicit-check-not=dbg.value
; RUN: opt %s --passes=inline -o - -S | FileCheck %s --implicit-check-not=dbg_value

;; The inliner, specially, hoists all alloca instructions into the entry block
;; of the calling function. Ensure that it doesn't accidentally transfer the
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/DebugInfo/Generic/inline-dbg-values.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -passes='cgscc(inline)' -S %s -o - -S | FileCheck %s --implicit-check-not=dbg.value
; RUN: opt -passes='cgscc(inline)' -S %s -o - -S | FileCheck %s --implicit-check-not=dbg_value

;; Test that dbg.value intrinsics are inlined, remapped, and have their
;; dilocation updated just like normal instructions. This becomes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -passes=callsite-splitting -S < %s | FileCheck %s --implicit-check-not=dbg.value
; RUN: opt -passes=callsite-splitting -S < %s | FileCheck %s --implicit-check-not=dbg_value

;; Test that DebugLocs are preserved, and that dbg.values are duplicated.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/LoopDeletion/diundef.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt %s -passes=loop-deletion -S | FileCheck %s --implicit-check-not=dbg.value
; RUN: opt %s -passes=loop-deletion -S | FileCheck %s --implicit-check-not=dbg_value

target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.14.0"
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/LoopRotate/dbgvalue.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -passes=loop-rotate -verify-memoryssa < %s | FileCheck %s --implicit-check-not=dbg.value
; RUN: opt -S -passes=loop-rotate -verify-memoryssa < %s | FileCheck %s --implicit-check-not=dbg_value

declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/LoopRotate/delete-dbg-values.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt --passes=loop-rotate -o - -S %s | FileCheck %s --implicit-check-not=dbg.value
; RUN: opt --passes=loop-rotate -o - -S %s | FileCheck %s --implicit-check-not=dbg_value
;
;; Test some fine-grained behaviour of loop-rotate's de-duplication of
;; dbg.values. The intrinsic on the first branch should be seen and
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/Util/Debugify/loc-only.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -passes=debugify -S < %s | FileCheck --check-prefixes=ALL,VALUE %s
; RUN: opt -passes=debugify -debugify-level=locations -S < %s | FileCheck --check-prefixes=ALL --implicit-check-not=dbg.value %s
; RUN: opt -passes=debugify -debugify-level=locations -S < %s | FileCheck --check-prefixes=ALL --implicit-check-not=dbg_value %s


; ALL-LABEL: @test
Expand Down
Loading