[llvm-commits] [release_20] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Tanya Lattner tonic at nondot.org
Tue May 22 23:07:55 PDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.762.2.3 -> 1.762.2.4
---
Log message:

Fixing patch mistake. 



---
Diffs of the changes:  (+5 -5)

 InstructionCombining.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762.2.3 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762.2.4
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762.2.3	Tue May 22 23:22:41 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Wed May 23 01:07:37 2007
@@ -7767,11 +7767,6 @@
   const FunctionType *FT = Callee->getFunctionType();
   const Type *OldRetTy = Caller->getType();
 
-  // Check to see if we are changing the return type...
-  if (OldRetTy != FT->getReturnType()) {
-    if (Callee->isDeclaration() && !Caller->use_empty() && 
-        // Conversion is ok if changing from pointer to int of same size.
-        !(isa<PointerType>(FT->getReturnType()) &&
   const FunctionType *ActualFT =
     cast<FunctionType>(cast<PointerType>(CE->getType())->getElementType());
   
@@ -7780,6 +7775,11 @@
   if (FT->getParamAttrs() != ActualFT->getParamAttrs())
     return false;
   
+  // Check to see if we are changing the return type...
+  if (OldRetTy != FT->getReturnType()) {
+    if (Callee->isDeclaration() && !Caller->use_empty() && 
+        // Conversion is ok if changing from pointer to int of same size.
+        !(isa<PointerType>(FT->getReturnType()) &&
           TD->getIntPtrType() == OldRetTy))
       return false;   // Cannot transform this return value.
 






More information about the llvm-commits mailing list