[all-commits] [llvm/llvm-project] b215a2: [AMDGPU] Update LiveVariables in convertToThreeAdd...

Ruiling, Song via All-commits all-commits at lists.llvm.org
Mon Oct 12 17:13:05 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b215a26628feae349d663f687efe475d622970b7
      https://github.com/llvm/llvm-project/commit/b215a26628feae349d663f687efe475d622970b7
  Author: Ruiling Song <ruiling.song at amd.com>
  Date:   2020-10-13 (Tue, 13 Oct 2020)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    A llvm/test/CodeGen/AMDGPU/stale-livevar-in-twoaddr-pass.mir

  Log Message:
  -----------
  [AMDGPU] Update LiveVariables in convertToThreeAddress()

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.

Differential Revision: https://reviews.llvm.org/D89092




More information about the All-commits mailing list