[llvm-bugs] [Bug 35400] New: Too much narrowing when converting dbg.declare to dbg.value
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 23 09:19:25 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35400
Bug ID: 35400
Summary: Too much narrowing when converting dbg.declare to
dbg.value
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: mattias.v.eriksson at ericsson.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19462
--> https://bugs.llvm.org/attachment.cgi?id=19462&action=edit
Reproduce with: opt -sroa -S dbgvaluesext.ll
I think this is a bug in how a llvm.dbg.declare is converted to llvm.dbg.value.
Input, the variable "bl" is 64 bit on the stack:
define i64 @refAddshSat(i32 %param32) {
bb2:
%local64 = alloca i64
call void @llvm.dbg.declare(metadata i64* %local64, metadata !10, metadata
!DIExpression()), !dbg !12
%_tmp20 = sext i32 %param32 to i64
store i64 %_tmp20, i64* %local64
%_tmp24 = load i64, i64* %local64
ret i64 %_tmp24
}
!10 = !DILocalVariable(name: "bl", scope: !9, line: 58, type: !11)
!11 = !DIBasicType(name: "long long", size: 64, encoding: DW_ATE_signed)
After SROA we get "bl" as a 32 bit temporary, this looks incorrect to me:
define i64 @refAddshSat(i32 %param32) {
bb2:
%_tmp20 = sext i32 %param32 to i64
call void @llvm.dbg.value(metadata i32 %param32, metadata !4, metadata
!DIExpression()), !dbg !11
ret i64 %_tmp20
}
!4 = !DILocalVariable(name: "bl", scope: !5, line: 58, type: !10)
!10 = !DIBasicType(name: "long long", size: 64, encoding: DW_ATE_signed)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171123/43caeb59/attachment.html>
More information about the llvm-bugs
mailing list