[llvm-commits] [llvm] r81103 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Daniel Dunbar daniel at zuster.org
Sat Sep 5 19:31:36 PDT 2009


Author: ddunbar
Date: Sat Sep  5 21:31:36 2009
New Revision: 81103

URL: http://llvm.org/viewvc/llvm-project?rev=81103&view=rev
Log:
Fix a possible crash call setIsInBounds.
 - I think there are more instances of this, but I think they are fixed in Dan's
   incoming patch. This one was preventing me from doing a bugpoint reduction
   though.

Modified:
    llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=81103&r1=81102&r2=81103&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Sat Sep  5 21:31:36 2009
@@ -12160,8 +12160,8 @@
                                             PointerType::get(EI.getType(), AS),
                                             I->getOperand(0)->getName());
         Value *GEP =
-          Builder->CreateGEP(Ptr, EI.getOperand(1), I->getName()+".gep");
-        cast<GEPOperator>(GEP)->setIsInBounds(true);
+          Builder->CreateInBoundsGEP(Ptr, EI.getOperand(1),
+                                     I->getName()+".gep");
         
         LoadInst *Load = Builder->CreateLoad(GEP, "tmp");
 





More information about the llvm-commits mailing list