Micro-optimize this.
[oota-llvm.git] / lib / Analysis / ScalarEvolutionExpander.cpp
index 0012b84e1f0883190b948ce0785cbdd008e79c0f..4f49bf17fb4ca8518789a97f9d158bd1d8cd705a 100644 (file)
@@ -1312,7 +1312,9 @@ Value *SCEVExpander::expand(const SCEV *S) {
 }
 
 void SCEVExpander::rememberInstruction(Value *I) {
-  if (PostIncLoops.empty())
+  if (!PostIncLoops.empty())
+    InsertedPostIncValues.insert(I);
+  else
     InsertedValues.insert(I);
 
   // If we just claimed an existing instruction and that instruction had