This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Transfer DbgValues when casts are optimized in SelectionDAG::getNode
ClosedPublic

Authored by asmith on May 1 2018, 9:57 PM.

Details

Summary

getNode optimizes (ext (trunc x)) to x and the dbgvalue node on trunc is lost. The fix calls transferDbgValues to add the dbgvalue to x.

Add DebugInfo/AArch64/dbg-value-i16.ll

Patch by Sejong Oh!

Diff Detail

Repository
rL LLVM

Event Timeline

asmith created this revision.May 1 2018, 9:57 PM
aprantl accepted this revision.May 2 2018, 9:25 AM
aprantl added inline comments.
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
3965 ↗(On Diff #144830)

typo?

This revision is now accepted and ready to land.May 2 2018, 9:25 AM
aprantl added a reviewer: vsk.May 2 2018, 9:25 AM
vsk requested changes to this revision.May 2 2018, 11:07 AM

Thanks for the patch! Could you upload a diff with context (git diff -U10000)?

lib/CodeGen/SelectionDAG/SelectionDAG.cpp
3969 ↗(On Diff #144830)

Why is InvalidateDbg false? Does the debug value attached to Operand need to remain valid after it's cloned and attached to OpOp?

This revision now requires changes to proceed.May 2 2018, 11:07 AM
asmith updated this revision to Diff 145140.May 3 2018, 8:44 PM
asmith marked 2 inline comments as done.
vsk accepted this revision.May 4 2018, 9:55 AM

LGTM, thanks!

This revision is now accepted and ready to land.May 4 2018, 9:55 AM
This revision was automatically updated to reflect the committed changes.