Skip to content
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

Clear debug information for kill and replacement #3459

Merged
merged 4 commits into from
Jun 25, 2020
Merged
Changes from 1 commit
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
26 changes: 13 additions & 13 deletions test/opt/local_ssa_elim_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2185,13 +2185,13 @@ TEST_F(LocalSSAElimTest, DebugValueForReferenceVariable) {
; CHECK: [[f_name:%\w+]] = OpString "f"
; CHECK: [[i_name:%\w+]] = OpString "i"
; CHECK: [[x_name:%\w+]] = OpString "x"
; CHECK: [[dbg_f:%\w+]] = OpExtInst %void [[ext:%\d+]] DebugLocalVariable [[f_name]]
; CHECK: OpExtInst %void [[ext:%\d+]] DebugLocalVariable [[f_name]]
; CHECK: [[dbg_i:%\w+]] = OpExtInst %void [[ext]] DebugLocalVariable [[i_name]]
; CHECK: [[dbg_x:%\w+]] = OpExtInst %void [[ext]] DebugLocalVariable [[x_name]]
; CHECK: OpExtInst %void [[ext]] DebugLocalVariable [[x_name]]

; CHECK: OpStore %f %float_0
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_f]] %float_0
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_x]] %float_0
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} %float_0
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} %float_0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you not checking the local variables anymore? If the issue is order, you can use CHECK-DAG.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. CHECK-DAG is what I needed.

; CHECK-NEXT: OpStore %i %int_0
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_i]] %int_0

Expand All @@ -2200,8 +2200,8 @@ TEST_F(LocalSSAElimTest, DebugValueForReferenceVariable) {
; CHECK: [[loop_head:%\w+]] = OpLabel
; CHECK: [[phi0:%\w+]] = OpPhi %float %float_0
; CHECK: [[phi1:%\w+]] = OpPhi %int %int_0
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_f]] [[phi0]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_x]] [[phi0]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} [[phi0]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} [[phi0]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_i]] [[phi1]]
; CHECK: OpLoopMerge [[loop_merge:%\w+]] [[loop_cont:%\w+]] None
; CHECK-NEXT: OpBranch [[loop_body:%\w+]]
Expand All @@ -2211,8 +2211,8 @@ TEST_F(LocalSSAElimTest, DebugValueForReferenceVariable) {

; CHECK: [[bb]] = OpLabel
; CHECK: OpStore %f [[f_val:%\w+]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_f]] [[f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_x]] [[f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} [[f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} [[f_val]]
; CHECK-NEXT: OpBranch [[loop_cont]]

; CHECK: [[loop_cont]] = OpLabel
Expand Down Expand Up @@ -2343,7 +2343,7 @@ TEST_F(LocalSSAElimTest, DebugValueForReferenceVariableInBB) {
; CHECK: [[dbg_bb_child:%\w+]] = OpExtInst %void [[ext]] DebugLexicalBlock
; CHECK: [[dbg_f:%\w+]] = OpExtInst %void [[ext]] DebugLocalVariable [[f_name]]
; CHECK: [[dbg_i:%\w+]] = OpExtInst %void [[ext]] DebugLocalVariable [[i_name]]
; CHECK: [[dbg_x:%\w+]] = OpExtInst %void [[ext]] DebugLocalVariable [[x_name]]
; CHECK: OpExtInst %void [[ext]] DebugLocalVariable [[x_name]]

; CHECK: OpExtInst %void [[ext]] DebugScope [[dbg_main]]
; CHECK: OpStore %f %float_0
Expand All @@ -2368,15 +2368,15 @@ TEST_F(LocalSSAElimTest, DebugValueForReferenceVariableInBB) {
; CHECK: [[bb]] = OpLabel
; CHECK: OpExtInst %void [[ext]] DebugScope [[dbg_bb]]
; CHECK: OpStore %f [[f_val:%\w+]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_f]] [[f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_x]] [[f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} [[f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} [[f_val]]
; CHECK-NEXT: OpBranch [[bb_child:%\w+]]

; CHECK: [[bb_child]] = OpLabel
; CHECK: OpExtInst %void [[ext]] DebugScope [[dbg_bb_child]]
; CHECK: OpStore %f [[new_f_val:%\w+]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_f]] [[new_f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue [[dbg_x]] [[new_f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} [[new_f_val]]
; CHECK-NEXT: OpExtInst %void [[ext]] DebugValue {{%\w+}} [[new_f_val]]
; CHECK-NEXT: OpBranch [[loop_cont]]

; CHECK: [[loop_cont]] = OpLabel
Expand Down