-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[Verifier] Require that dbg.declare variable is a ptr #134355
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,8 +55,9 @@ end: ; preds = %body | |
|
|
||
| define i64 @simulateWithDbgDeclare(<2 x i32> %a) local_unnamed_addr { | ||
| entry: | ||
| %ptr = alloca i32 | ||
|
||
| %rand = tail call i64 @lrand48() #3 | ||
| tail call void @llvm.dbg.declare(metadata i64 %rand, metadata !6, metadata !7), !dbg !8 | ||
| tail call void @llvm.dbg.declare(metadata ptr %ptr, metadata !6, metadata !7), !dbg !8 | ||
| br label %body | ||
|
|
||
| body: ; preds = %body, %entry | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,8 +55,9 @@ end: ; preds = %body | |
|
|
||
| define i64 @simulateWithDbgDeclare(<2 x i32> %a) local_unnamed_addr { | ||
| entry: | ||
| %ptr = alloca i32 | ||
| %rand = tail call i64 @lrand48() #3 | ||
| tail call void @llvm.dbg.declare(metadata i64 %rand, metadata !6, metadata !7), !dbg !8 | ||
| tail call void @llvm.dbg.declare(metadata ptr %ptr, metadata !6, metadata !7), !dbg !8 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this slightly changes the tested behaviour, because the new dbg.declare will get put in the MF side-table: https://godbolt.org/z/bh6oEM55G The old dbg.declare causes a DBG_INSTR_REF, whereas the new on gets stuffed into Since the test isn't checking for the debug instruction in the output, maybe it doesn't matter, but I'd personally err on the side of minimising the change in output. YMMV. |
||
| br label %body | ||
|
|
||
| body: ; preds = %body, %entry | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, since the if now uses braces the "else if" should as well.