This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add tests cases for or-lea with no common bits.
ClosedPublic

Authored by OmerAviram on Nov 17 2021, 4:50 AM.

Details

Summary

Added tests are permutations of the pattern: (X & ~M) or (Y & M).

Diff Detail

Event Timeline

OmerAviram created this revision.Nov 17 2021, 4:50 AM
OmerAviram requested review of this revision.Nov 17 2021, 4:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2021, 4:50 AM
RKSimon added inline comments.Nov 22 2021, 3:33 AM
llvm/test/CodeGen/X86/or-lea.ll
154

Why have you used i16? That is the one type that x86 will try very hard to promote to i32/64 for a shorter encoding and to break partial register dependencies.

OmerAviram added inline comments.Nov 22 2021, 7:05 AM
llvm/test/CodeGen/X86/or-lea.ll
154

I see, thanks. Any suggestion for a type better suited for those tests?

RKSimon added inline comments.Nov 22 2021, 8:51 AM
llvm/test/CodeGen/X86/or-lea.ll
154

Probably a mixture of i32 and i64 tests?

Also, please don't just number tests - try to give them descriptive names like most of these existing tests in this file.

OmerAviram marked an inline comment as done.
RKSimon accepted this revision.Nov 24 2021, 3:40 AM

LGTM

This revision is now accepted and ready to land.Nov 24 2021, 3:40 AM

@OmerAviram Do you have commit access?

@OmerAviram Do you have commit access?

I don't, would appreciate if you could commit on my behalf.
Thanks.

This revision was automatically updated to reflect the committed changes.