From: Jakob Stoklund Olesen Date: Mon, 13 Feb 2012 18:17:04 +0000 (+0000) Subject: Check regmask interference for -join-physregs. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3ed4dee530984b7087dd3bbf4cfd8a3f1947c8e0;p=oota-llvm.git Check regmask interference for -join-physregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150404 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index 2144137e634..61dcec2eab9 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/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;