diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-05-11 23:22:18 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-05-11 23:22:18 +0000 |
commit | 3011a33a63b055fc3c0bba51728e13c8b0f1c20e (patch) | |
tree | 3b17a228fc70eb5a8793ddff8b302294bad649f9 /lib | |
parent | aefd36bdda0dac496b8acabb25f0de29b370ebca (diff) |
Do not replace operands of pseudo instructions with register $zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156663 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/Mips/MipsISelDAGToDAG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsISelDAGToDAG.cpp b/lib/Target/Mips/MipsISelDAGToDAG.cpp index 6e5bad7f15..027c171eff 100644 --- a/lib/Target/Mips/MipsISelDAGToDAG.cpp +++ b/lib/Target/Mips/MipsISelDAGToDAG.cpp @@ -213,7 +213,8 @@ bool MipsDAGToDAGISel::ReplaceUsesWithZeroReg(MachineRegisterInfo *MRI, MachineInstr *MI = MO.getParent(); // Do not replace if it is a phi's operand or is tied to def operand. - if (MI->isPHI() || MI->isRegTiedToDefOperand(U.getOperandNo())) + if (MI->isPHI() || MI->isRegTiedToDefOperand(U.getOperandNo()) || + MI->isPseudo()) continue; MO.setReg(ZeroReg); |