Fix an assert in store-to-load forwarding.

The code does the right thing, but the assert should be checking that
the load we're about to replace has the same type as the value we're
replacing it with.

This was exposed by changes to inline generic code.

Swift SVN r19921
This commit is contained in:
Mark Lacey
2014-07-14 06:32:15 +00:00
parent 8eba52fe4d
commit f1a6921564

View File

@@ -297,7 +297,7 @@ tryToForwardAddressValueToUncheckedAddrToLoad(SILValue Address,
if (!ExtractPath)
return SILValue();
assert(ExtractPath.getType() == UADCI->getType().getObjectType() &&
assert(ExtractPath.getType() == LI->getType().getObjectType() &&
"Must have same types here.");
return ExtractPath;