The PPC MFCR instruction implicitly uses all 8 of the CR
authorDale Johannesen <dalej@apple.com>
Thu, 20 May 2010 17:48:26 +0000 (17:48 +0000)
committerDale Johannesen <dalej@apple.com>
Thu, 20 May 2010 17:48:26 +0000 (17:48 +0000)
commit5f07d5224ddc32f405d7e19de8e58e91ab2816bc
tree8817c25a649dad2d2f38f0d5a11feee1ad8fb847
parent69b4d1caff87585938641737ff39dcee5d104556
The PPC MFCR instruction implicitly uses all 8 of the CR
registers.  Currently it is not so marked, which leads to
VCMPEQ instructions that feed into it getting deleted.
If it is so marked, local RA complains about this sequence:
 vreg = MCRF  CR0
 MFCR  <kill of whatever preg got assigned to vreg>
All current uses of this instruction are only interested in
one of the 8 CR registers, so redefine MFCR to be a normal
unary instruction with a CR input (which is emitted only as
a comment).  That avoids all problems.  7739628.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104238 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.td
lib/Target/PowerPC/PPCRegisterInfo.cpp