diff options
author | Jay Foad <jay.foad@amd.com> | 2022-10-21 14:08:58 +0100 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2022-10-21 14:57:03 +0100 |
commit | 33f78d0903eb1f7b2a7517218725caee1adfb4a3 (patch) | |
tree | b9f17b210d97994e251625da24c9a1cb68598413 /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | 3bee2fb26222b71ba30234586dc0e6c197358091 (diff) | |
download | llvm-33f78d0903eb1f7b2a7517218725caee1adfb4a3.zip llvm-33f78d0903eb1f7b2a7517218725caee1adfb4a3.tar.gz llvm-33f78d0903eb1f7b2a7517218725caee1adfb4a3.tar.bz2 |
[TwoAddressInstruction] Fix stale LiveVariables info in processStatepoint
D129213 improves verification of LiveVariables, and caused
CodeGen/X86/statepoint-cmp-sunk-past-statepoint.ll to fail with:
*** Bad machine code: LiveVariables: Block should not be in AliveBlocks ***
after Two-Address instruction pass.
Fix it by clearing AliveBlocks for a register which is no longer used.
Differential Revision: https://reviews.llvm.org/D136445
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index a487ec3..78bf030 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -1706,6 +1706,7 @@ bool TwoAddressInstructionPass::processStatepoint( LiveVariables::VarInfo &SrcInfo = LV->getVarInfo(RegB); LiveVariables::VarInfo &DstInfo = LV->getVarInfo(RegA); SrcInfo.AliveBlocks |= DstInfo.AliveBlocks; + DstInfo.AliveBlocks.clear(); for (auto *KillMI : DstInfo.Kills) LV->addVirtualRegisterKilled(RegB, *KillMI, false); } |