Fix Regression/CodeGen/PowerPC/2005-01-14-UndefLong.ll
authorChris Lattner <sabre@nondot.org>
Fri, 14 Jan 2005 20:22:02 +0000 (20:22 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 14 Jan 2005 20:22:02 +0000 (20:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19557 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPC32ISelSimple.cpp

index bad0fb1b408cc47b4815f72d8ab1ae8d7d238293..79b3c1bd36d87061a3889fc1db77e647ac9a2218 100644 (file)
@@ -612,6 +612,8 @@ void PPC32ISel::copyConstantToRegister(MachineBasicBlock *MBB,
                                        Constant *C, unsigned R) {
   if (isa<UndefValue>(C)) {
     BuildMI(*MBB, IP, PPC::IMPLICIT_DEF, 0, R);
+    if (getClass(C->getType()) == cLong)
+      BuildMI(*MBB, IP, PPC::IMPLICIT_DEF, 0, R+1);
     return;
   }
   if (C->getType()->isIntegral()) {