Mercurial > hg > CbC > CbC_llvm
diff lib/Target/Mips/MipsSEISelDAGToDAG.cpp @ 100:7d135dc70f03 LLVM 3.9
LLVM 3.9
author | Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 22:53:40 +0900 |
parents | afa8332a0e37 |
children | 1172e4bd9c6f |
line wrap: on
line diff
--- a/lib/Target/Mips/MipsSEISelDAGToDAG.cpp Tue Oct 13 17:49:56 2015 +0900 +++ b/lib/Target/Mips/MipsSEISelDAGToDAG.cpp Tue Jan 26 22:53:40 2016 +0900 @@ -115,6 +115,11 @@ if (MI->isPHI() || MI->isRegTiedToDefOperand(OpNo) || MI->isPseudo()) continue; + // Also, we have to check that the register class of the operand + // contains the zero register. + if (!MRI->getRegClass(MO.getReg())->contains(ZeroReg)) + continue; + MO.setReg(ZeroReg); }