Fix issues that the local allocator has dealing with instructions that implicitly use ST(0)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12855 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp
index c8802ed..23401f6 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/lib/Target/X86/InstSelectSimple.cpp
@@ -934,7 +934,7 @@
       BuildMI(*MBB, IP, X86::FNSTSW8r, 0);
       BuildMI(*MBB, IP, X86::SAHF, 1);
     } else {
-      BuildMI(*MBB, IP, X86::FUCOMIr, 2).addReg(Op0r).addReg(Op1r);
+      BuildMI(*MBB, IP, X86::FpUCOMI, 2).addReg(Op0r).addReg(Op1r);
     }
     break;
 
@@ -1774,6 +1774,10 @@
     case Instruction::Call:
     case Instruction::Invoke:
       return false;
+    case Instruction::Load:
+      if (cast<LoadInst>(It)->isVolatile() && LI.isVolatile())
+        return false;
+      break;
     }
   }
   return true;