[PATCH] D133118: Fix invalid llvm.dbg.declare after instcombine (#56807)
Nikolaos Kavvadias via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 08:42:34 PDT 2022
nikolaos-amd created this revision.
nikolaos-amd added reviewers: jmorse, mgehre-amd.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nikolaos-amd requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Fixes https://github.com/llvm/llvm-project/issues/56807
The problem occurs when the InstCombine pass removes an unnecessary BitCast but does not update the operand of the llvm.dbg.declare intrinsic call. This makes the llvm.dbg.declare have undef as its operand, but the problem can go away if we replace debug uses of the old alloca in the new alloca.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133118
Files:
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/test/Transforms/InstCombine/no-undef-bitcast-to-gep-ret.ll
llvm/test/Transforms/InstCombine/no-undef-bitcast-to-gep.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133118.457287.patch
Type: text/x-patch
Size: 6883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220901/b7ac531a/attachment.bin>
More information about the llvm-commits
mailing list