<div dir="ltr"><div>This patch fixes GVN::AnalyzeLoadAvailability to pass the phi-translated pointer address of the load instruction that is processed instead of the untranslated address to AnalyzeLoadFromClobberingLoad.<br>
</div><div><br></div><div>Without the fix, GVN::AnalyzeLoadAvailability incorrectly determines a load value is available or unavailable in a basic block, which causes load-PRE to incorrectly determine a load is partially redundant when it isn't (see first function in test case) or it isn't partially redundant when it is (second function in test case).</div>
<div><br></div><div>I tested this patch running the test suite and didn't see any failing tests.</div><div><br></div><div><rdar://problem/16638765>.<br></div><div><br></div><div>Please review.</div></div>