[PATCH] D89092: [AMDGPU] Update LiveVariables in convertToThreeAddress()

Ruiling, Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 20:28:26 PDT 2020


ruiling created this revision.
ruiling added a reviewer: arsenm.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: LLVM.
ruiling requested review of this revision.
Herald added a subscriber: wdng.

This can fix an asan failure like below.

15856==ERROR: AddressSanitizer: use-after-poison on address ...
---------------------------------------------------------------

READ of size 8 at 0x6210001a3cb0 thread T0

  #0 llvm::MachineInstr::getParent()
  #1 llvm::LiveVariables::VarInfo::findKill()
  #2 TwoAddressInstructionPass::rescheduleMIBelowKill()
  #3 TwoAddressInstructionPass::tryInstructionTransform()
  #4 TwoAddressInstructionPass::runOnMachineFunction()

We need to update the Kills if we replace instructions. The Kills
may be later accessed within TwoAddressInstruction pass.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89092

Files:
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89092.297117.patch
Type: text/x-patch
Size: 5814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201009/eaa8aaf5/attachment.bin>


More information about the llvm-commits mailing list