diff options
| author | Chen Zheng <czhengsz@cn.ibm.com> | 2019-01-30 01:57:01 +0000 |
|---|---|---|
| committer | Chen Zheng <czhengsz@cn.ibm.com> | 2019-01-30 01:57:01 +0000 |
| commit | ca26039cc705596f54020e115aea699073365682 (patch) | |
| tree | b1d1978bce80d779b88a5b33d073d686230f4347 /llvm/lib/Target/PowerPC | |
| parent | 4a4d7a7be8c0353356eda708ee8514c1cf405505 (diff) | |
| download | bcm5719-llvm-ca26039cc705596f54020e115aea699073365682.tar.gz bcm5719-llvm-ca26039cc705596f54020e115aea699073365682.zip | |
[PowerPC] more opportunity for converting reg+reg to reg+imm
Differential Revision: https://reviews.llvm.org/D57314
llvm-svn: 352583
Diffstat (limited to 'llvm/lib/Target/PowerPC')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp index bb856c242ed..ecc5e28c0d8 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -3205,9 +3205,9 @@ bool PPCInstrInfo::isRegElgibleForForwarding(const MachineOperand &RegMO, } assert((&*It) == &DefMI && "DefMI is missing"); - // If DefMI also uses the register to be forwarded, we can only forward it + // If DefMI also defines the register to be forwarded, we can only forward it // if DefMI is being erased. - if (DefMI.readsRegister(Reg, &getRegisterInfo())) + if (DefMI.modifiesRegister(Reg, &getRegisterInfo())) return KillDefMI; return true; |

