diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-13 18:17:04 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-13 18:17:04 +0000 |
commit | 6f8fe71216be0af3faa9afc0fcbb81aa76a80b11 (patch) | |
tree | 9427855d7aabbacc2f4b517460d10c3b6bcc275d /llvm/lib | |
parent | 636d2832023ea03680618259ed2bd6600e42c01a (diff) | |
download | bcm5719-llvm-6f8fe71216be0af3faa9afc0fcbb81aa76a80b11.tar.gz bcm5719-llvm-6f8fe71216be0af3faa9afc0fcbb81aa76a80b11.zip |
Check regmask interference for -join-physregs.
llvm-svn: 150404
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 2144137e634..61dcec2eab9 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -1426,6 +1426,14 @@ bool RegisterCoalescer::JoinIntervals(CoalescerPair &CP) { return true; } + // Check if a register mask clobbers DstReg. + BitVector UsableRegs; + if (LIS->checkRegMaskInterference(RHS, UsableRegs) && + !UsableRegs.test(CP.getDstReg())) { + DEBUG(dbgs() << "\t\tRegister mask interference.\n"); + return false; + } + for (const unsigned *AS = TRI->getAliasSet(CP.getDstReg()); *AS; ++AS){ if (!LIS->hasInterval(*AS)) continue; |