[llvm] r175130 - RegisterCoalescer::reMaterializeTrivialDef() can constrain the destination
Cameron Zwarich
zwarich at apple.com
Wed Feb 13 19:25:25 PST 2013
Author: zwarich
Date: Wed Feb 13 21:25:24 2013
New Revision: 175130
URL: http://llvm.org/viewvc/llvm-project?rev=175130&view=rev
Log:
RegisterCoalescer::reMaterializeTrivialDef() can constrain the destination
register class to match the defining instruction.
Modified:
llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=175130&r1=175129&r2=175130&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Wed Feb 13 21:25:24 2013
@@ -769,7 +769,7 @@ bool RegisterCoalescer::reMaterializeTri
// extract_subreg, insert_subreg, subreg_to_reg coalescing.
const TargetRegisterClass *RC = TII->getRegClass(MCID, 0, TRI, *MF);
if (TargetRegisterInfo::isVirtualRegister(DstReg)) {
- if (MRI->getRegClass(DstReg) != RC)
+ if (!MRI->constrainRegClass(DstReg, RC))
return false;
} else if (!RC->contains(DstReg))
return false;
More information about the llvm-commits
mailing list