This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add isel patterns to match BMI/TBMI instructions when lowering has turned the root nodes into one of the flag producing binops.
ClosedPublic

Authored by craig.topper on Dec 18 2018, 12:52 AM.

Details

Summary

This fixes the patterns that have or/and as a root. 'and' is still broken because lowering keeps a CMP and we match it and the and to TEST. To fix this we'll probably need some custom code in X86ISelDAGToDAG or something. I had to look for uses of the CF flag because all these nodes have non-standard CF flag behavior. A real or/xor would always clear CF. In practice we shouldn't be using the CF flag from these nodes as far as I know.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Dec 18 2018, 12:52 AM
RKSimon accepted this revision.Dec 21 2018, 10:58 AM

LGTM - Are those FIXMEs for and roots listed in a bugzilla anywhere?

This revision is now accepted and ready to land.Dec 21 2018, 10:58 AM

I can drop the AND FIXME. We got that fixed in D55870.

This revision was automatically updated to reflect the committed changes.