mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
[WebAssembly] Fix MRI.hasOneNonDBGUse assert in WebAssemblyRegStackify pass
Summary: The OneUseDominatesOtherUses in the WebAssemblyRegStackify not properly validates register use using hasOneUse. Since we added/modified DBG_VALUE the assert started catching valid cases. See also https://reviews.llvm.org/D49034#1247200 Fix verified by running the wasm waterfall. Reviewed By: dschuff Tags: #debug-info Differential Revision: https://reviews.llvm.org/D49034 llvm-svn: 343154
This commit is contained in:
parent
0772f8e0fa
commit
d7b0d2ae73
@ -428,8 +428,8 @@ static bool OneUseDominatesOtherUses(unsigned Reg, const MachineOperand &OneUse,
|
||||
if (!TargetRegisterInfo::isVirtualRegister(DefReg) ||
|
||||
!MFI.isVRegStackified(DefReg))
|
||||
return false;
|
||||
assert(MRI.hasOneUse(DefReg));
|
||||
const MachineOperand &NewUse = *MRI.use_begin(DefReg);
|
||||
assert(MRI.hasOneNonDBGUse(DefReg));
|
||||
const MachineOperand &NewUse = *MRI.use_nodbg_begin(DefReg);
|
||||
const MachineInstr *NewUseInst = NewUse.getParent();
|
||||
if (NewUseInst == OneUseInst) {
|
||||
if (&OneUse > &NewUse)
|
||||
|
Loading…
Reference in New Issue
Block a user