This is an archive of the discontinued LLVM Phabricator instance.

[llvm-diff] Precommit: Add loop test case with forward reference
ClosedPublic

Authored by jsilvanus on Nov 2 2022, 8:51 AM.

Details

Summary

Diffing phi nodes was recently added to llvm-diff (https://reviews.llvm.org/D114211).
However, there currently is a limitation where equivalent values
cannot be detected as such, leading to false positive diff reports.

If a phi node refers a value defined in a basic block dominated by
the current basic block, for example a phi node in a loop header referring
a value defined in the loop body, we cannot prove equivalence of the referred
values, because the basic block containing the variable definition has
not yet been processed.

This commit adds a test case showing this behavior, serving as a precommit
for an upcoming fix of the above.

Diff Detail

Event Timeline

jsilvanus created this revision.Nov 2 2022, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 8:51 AM
jsilvanus requested review of this revision.Nov 2 2022, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 8:51 AM
jsilvanus edited the summary of this revision. (Show Details)Nov 2 2022, 8:53 AM
jsilvanus added reviewers: void, dblaikie.
jsilvanus updated this revision to Diff 472646.Nov 2 2022, 9:20 AM

Fix branch target.

dblaikie accepted this revision.Nov 2 2022, 11:14 AM

Sure, sounds OK - we don't usually precommit tests, but it can make diffs clearer when submitting - not sure about this one in particular, but I don't mind too much just a thought for next time.

This revision is now accepted and ready to land.Nov 2 2022, 11:14 AM

Thanks for reviewing.

Yes, the intention is to help reviewing the actual patch, I was asked in the past to precommit such tests.