[PowerPC] Change liveness testing in VSX FMA mutation pass
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 17 Oct 2014 21:02:44 +0000 (21:02 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Fri, 17 Oct 2014 21:02:44 +0000 (21:02 +0000)
commitd2dcbd00f7889debe5c9bb3691e9dfaf5e0fa5a2
treea92e90a078028d5b1df98d1b469a636505ef1753
parent560e2700e257d34a3d79ef7e49dd1c572523ab36
[PowerPC] Change liveness testing in VSX FMA mutation pass

With VSX enabled, LLVM crashes when compiling
test/CodeGen/PowerPC/fma.ll.  I traced this to the liveness test
that's revised in this patch. The interval test is designed to only
work for virtual registers, but in this case the AddendSrcReg is
physical. Since there is already a walk of the MIs between the
AddendMI and the FMA, I added a check for def/kill of the AddendSrcReg
in that loop.  At Hal Finkel's request, I converted the liveness test
to an assert restricted to virtual registers.

I've changed the fma.ll test to have VSX and non-VSX variants so we
can test both kinds of multiply-adds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220090 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstrInfo.cpp
test/CodeGen/PowerPC/fma.ll