a compile time perf optimization to avoid a load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90507
91177308-0d34-0410-b5e6-
96231b3b80d8
InsertedVal = SingularValue;
}
+ // Either path through the 'if' should have set insertedVal -> SingularVal.
+ assert((InsertedVal == SingularValue || isa<UndefValue>(InsertedVal)) &&
+ "RAUW didn't change InsertedVal to be SingularVal");
+
// Drop the entries we added in IncomingPredInfo to restore the stack.
IncomingPredInfo.erase(IncomingPredInfo.begin()+FirstPredInfoEntry,
IncomingPredInfo.end());
- return InsertedVal;
+ return SingularValue;
}
// Otherwise, we do need a PHI: insert one now if we don't already have one.