This is an archive of the discontinued LLVM Phabricator instance.

[X86] Fix collectLeaves for adds used by phi that forms loop
ClosedPublic

Authored by HaohaiWen on Jul 5 2022, 9:22 PM.

Details

Summary

When add has additional users, we should indentify whether add's
user is phi that forms loop rather than root's.

Diff Detail

Event Timeline

HaohaiWen created this revision.Jul 5 2022, 9:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2022, 9:22 PM
HaohaiWen requested review of this revision.Jul 5 2022, 9:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 5 2022, 9:22 PM
LuoYuanke added inline comments.Jul 5 2022, 10:35 PM
llvm/test/CodeGen/X86/madd.ll
3241

You may commit the test case first, so that it is easier for us to just review the change.

HaohaiWen updated this revision to Diff 442526.Jul 6 2022, 5:15 AM

Add test for original code

HaohaiWen updated this revision to Diff 442528.Jul 6 2022, 5:18 AM

Update test for new code

HaohaiWen marked an inline comment as done.Jul 6 2022, 5:20 AM

Please show diff between diff2 and diff3 to see what changed.

LuoYuanke accepted this revision.Jul 6 2022, 5:32 AM

LGTM. Pls wait for 1 or 2 days in case there are comments from other reviewers.

This revision is now accepted and ready to land.Jul 6 2022, 5:32 AM
This revision was landed with ongoing or failed builds.Jul 7 2022, 7:39 PM
This revision was automatically updated to reflect the committed changes.