This is an archive of the discontinued LLVM Phabricator instance.

[X86] Teach DAG unfoldMemoryOperand to reconvert CMPs to tests
ClosedPublic

Authored by niravd on Feb 1 2018, 11:33 AM.

Details

Summary

Copy MI-level cmp->test conversion to SelectionDAG-level memory unfold.
This fixes a regression from D41293.

Diff Detail

Event Timeline

niravd created this revision.Feb 1 2018, 11:33 AM
craig.topper added inline comments.Feb 2 2018, 9:25 AM
llvm/lib/Target/X86/X86InstrInfo.cpp
9237

Any reason this can't be C->isNullValue()?

Or even just use isNullConstant to merge the first and second if.

niravd updated this revision to Diff 132848.Feb 5 2018, 9:19 AM

Address cleanup comments.

This revision is now accepted and ready to land.Feb 5 2018, 9:33 AM
This revision was automatically updated to reflect the committed changes.