[PATCH] D158171: [instcombine] Sunk instruction introduces unnecessary poison dbg.value

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 03:58:17 PDT 2023


CarlosAlbertoEnciso created this revision.
CarlosAlbertoEnciso added reviewers: dblaikie, aprantl, probinson, jryans, chrisjackson.
CarlosAlbertoEnciso added projects: debug-info, LLVM, All.
Herald added a subscriber: hiraditya.
CarlosAlbertoEnciso requested review of this revision.
Herald added a subscriber: llvm-commits.

For the given test case, when the 'int Four = Two;' is sunk into the 'case 0:'
block, the debug value for 'Three' is set incorrectly to 'poison'.

  ...
  int Four = Two;
  switch (One) {
    case 0:
      Three = Four;
      break;
  ...


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158171

Files:
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/sink-instruction-introduces-unnecessary-poison-value.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158171.551079.patch
Type: text/x-patch
Size: 6214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230817/0685a3a8/attachment.bin>


More information about the llvm-commits mailing list