Index: include/llvm/Support/TargetFolder.h
===================================================================
--- include/llvm/Support/TargetFolder.h	(revision 126080)
+++ include/llvm/Support/TargetFolder.h	(working copy)
@@ -34,8 +34,12 @@
   /// Fold - Fold the constant using target specific information.
   Constant *Fold(Constant *C) const {
     if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
-      if (Constant *CF = ConstantFoldConstantExpression(CE, TD))
+      if (Constant *CF = ConstantFoldConstantExpression(CE, TD)) {
+        if (CF != CE)
+					if (CE->use_empty())
+          	CE->destroyConstant();	
         return CF;
+			}
     return C;
   }
 
