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

Andrew Lenharth alenhar2 at cs.uiuc.edu
Wed Feb 7 14:32:38 PST 2007



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.536 -> 1.536.2.1
---
Log message:

Fix miscompile of linux kernel (llvm 1.9)

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

 InstructionCombining.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.536 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.536.2.1
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.536	Fri Nov  3 16:45:50 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Wed Feb  7 16:32:03 2007
@@ -377,9 +377,9 @@
   
   // If we are casting between pointer and integer types, treat pointers as
   // integers of the appropriate size for the code below.
-  if (isa<PointerType>(SrcTy)) SrcTy = TD->getIntPtrType();
-  if (isa<PointerType>(MidTy)) MidTy = TD->getIntPtrType();
-  if (isa<PointerType>(DstTy)) DstTy = TD->getIntPtrType();
+  if (isa<PointerType>(SrcTy)) SrcTy = TD->getIntPtrType()->getSignedVersion();
+  if (isa<PointerType>(MidTy)) MidTy = TD->getIntPtrType()->getSignedVersion();
+  if (isa<PointerType>(DstTy)) DstTy = TD->getIntPtrType()->getSignedVersion();
   
   // Allow free casting and conversion of sizes as long as the sign doesn't
   // change...






More information about the llvm-commits mailing list