[llvm-branch-commits] [llvm-branch] r243834 - Merging r243745:
Daniel Sanders
daniel.sanders at imgtec.com
Sat Aug 1 07:01:01 PDT 2015
Author: dsanders
Date: Sat Aug 1 09:01:00 2015
New Revision: 243834
URL: http://llvm.org/viewvc/llvm-project?rev=243834&view=rev
Log:
Merging r243745:
------------------------------------------------------------------------
r243745 | dsanders | 2015-07-31 13:58:55 +0100 (Fri, 31 Jul 2015) | 17 lines
[regalloc] Make RegMask clobbers prevent merging vreg's into PhysRegs when hoisting def's upwards.
Summary:
This prevents vreg260 and D7 from being merged in:
%vreg260<def> = LDC1 ...
JAL <ga:@sin>, <regmask ... list not containing D7 ...>
%D7<def> = COPY %vreg260; ...
Doing so is not valid because the JAL clobbers the D7.
This fixes the almabench regression in the LLVM 3.7.0 release branch.
Reviewers: MatzeB
Subscribers: MatzeB, qcolombet, hans, llvm-commits
Differential Revision: http://reviews.llvm.org/D11649
------------------------------------------------------------------------
Modified:
llvm/branches/release_37/ (props changed)
llvm/branches/release_37/lib/CodeGen/RegisterCoalescer.cpp
Propchange: llvm/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 1 09:01:00 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,242236,242239,242281,242288,242296,242331,242341,242410,242412,242433-242434,242442,242543,242673,242680,242706,242721-242722,242733-242735,242742,242869,242919,242993,243001,243057,243116,243263,243294,243361,243469,243485,243500,243519,243531,243589,243609,243636,243638,243640
+/llvm/trunk:155241,242236,242239,242281,242288,242296,242331,242341,242410,242412,242433-242434,242442,242543,242673,242680,242706,242721-242722,242733-242735,242742,242869,242919,242993,243001,243057,243116,243263,243294,243361,243469,243485,243500,243519,243531,243589,243609,243636,243638,243640,243745
Modified: llvm/branches/release_37/lib/CodeGen/RegisterCoalescer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/lib/CodeGen/RegisterCoalescer.cpp?rev=243834&r1=243833&r2=243834&view=diff
==============================================================================
--- llvm/branches/release_37/lib/CodeGen/RegisterCoalescer.cpp (original)
+++ llvm/branches/release_37/lib/CodeGen/RegisterCoalescer.cpp Sat Aug 1 09:01:00 2015
@@ -1531,6 +1531,14 @@ bool RegisterCoalescer::joinReservedPhys
DEBUG(dbgs() << "\t\tInterference (read): " << *MI);
return false;
}
+
+ // We must also check for clobbers caused by regmasks.
+ for (const auto &MO : MI->operands()) {
+ if (MO.isRegMask() && MO.clobbersPhysReg(DstReg)) {
+ DEBUG(dbgs() << "\t\tInterference (regmask clobber): " << *MI);
+ return false;
+ }
+ }
}
// We're going to remove the copy which defines a physical reserved
More information about the llvm-branch-commits
mailing list