[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Sun Dec 21 10:48:01 PST 2003


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.144 -> 1.145

---
Log message:

Move FP_REG_KILL closer to the return instruction.


---
Diffs of the changes:  (+2 -1)

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.144 llvm/lib/Target/X86/InstSelectSimple.cpp:1.145
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.144	Sat Dec 20 11:28:15 2003
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Sun Dec 21 10:47:43 2003
@@ -834,8 +834,8 @@
 ///   ret float/double : Top of FP stack
 ///
 void ISel::visitReturnInst(ReturnInst &I) {
-  BuildMI(BB, X86::FP_REG_KILL, 0);
   if (I.getNumOperands() == 0) {
+    BuildMI(BB, X86::FP_REG_KILL, 0);
     BuildMI(BB, X86::RET, 0); // Just emit a 'ret' instruction
     return;
   }
@@ -866,6 +866,7 @@
     visitInstruction(I);
   }
   // Emit a 'ret' instruction
+  BuildMI(BB, X86::FP_REG_KILL, 0);
   BuildMI(BB, X86::RET, 0);
 }
 





More information about the llvm-commits mailing list