Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.762.2.1 -> 1.762.2.2
---
Log message:

Merge from mainline


---
Diffs of the changes:  (+8 -0)

 InstructionCombining.cpp |    8 ++++++++
 1 files changed, 8 insertions(+)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762.2.1 
llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762.2.2
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762.2.1       Fri May 
18 01:03:55 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue May 22 00:38:40 2007
@@ -7773,6 +7773,14 @@
     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());
+  
+  // If the parameter attributes don't match up, don't do the xform.  We don't
+  // want to lose an sret attribute or something.
+  if (FT->getParamAttrs() != ActualFT->getParamAttrs())
+    return false;
+  
           TD->getIntPtrType() == OldRetTy))
       return false;   // Cannot transform this return value.
 



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to