diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-09-16 16:58:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-09-16 16:58:29 +0000 |
commit | 16d6b3b3da62aa5baaf3c66c8d4e6f8c8f70aeb7 (patch) | |
tree | 6031356a30dab2c3c69c332095eb59f34b4e0961 /contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp | |
parent | ceff9b9d2587c46759fd6fb312916d5748986918 (diff) | |
parent | e588341d487d7ec86b5282968e3223f8c0e6de27 (diff) |
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp index 70d6dcc2e3e2..4c4839ca6522 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp @@ -336,10 +336,8 @@ static bool isNopCopy(const MachineInstr &PreviousCopy, unsigned Src, unsigned Def, const TargetRegisterInfo *TRI) { Register PreviousSrc = PreviousCopy.getOperand(1).getReg(); Register PreviousDef = PreviousCopy.getOperand(0).getReg(); - if (Src == PreviousSrc) { - assert(Def == PreviousDef); + if (Src == PreviousSrc && Def == PreviousDef) return true; - } if (!TRI->isSubRegister(PreviousSrc, Src)) return false; unsigned SubIdx = TRI->getSubRegIndex(PreviousSrc, Src); |