https://bugs.llvm.org/show_bug.cgi?id=52373
Bug ID: 52373
Summary: [DAGCombiner] SDDbgValue is set as invalid by
tryToFoldExtOfLoad()
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Created attachment 25409
--> https://bugs.llvm.org/attachment.cgi?id=25409&action=edit
reduced testcase
This reduced function has an i32 argument passed to a called function:
define void @fun1(i1 %u) #0 !dbg !4 {
entry:
%0 = load i32, i32* @t, align 4
tail call void @llvm.dbg.value(metadata i32 %0, metadata !10, metadata
!DIExpression()), !dbg !17
tail call void @_Z1fi(i32 %0)
unreachable
}
llc -mtriple=s390x-linux-gnu -O0 tc_dbgval.ll -o - |& grep DEBUG
#DEBUG_VALUE: s <- $r2l
If that argument is signextended, the debug value is invalidated ("removed"):
llc -mtriple=s390x-linux-gnu -O0 tc_dbgval_arg_signext.ll -o - |& grep DEBUG
#DEBUG_VALUE: s <- undef
diff tc_dbgval.ll tc_dbgval_arg_signext.ll
13c13
< tail call void @_Z1fi(i32 %0)
---
> tail call void @_Z1fi(i32 signext %0)
tryToFoldExtOfLoad() calls DAG.ReplaceAllUsesOfValueWith(), which calls
transferDbgValues(), but this is not working properly. When the original load
is deleted, the DbgValue is invalidated.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs