This is an archive of the discontinued LLVM Phabricator instance.

[X86] Remove patterns for ADD/AND/OR/SUB/XOR/CMP with immediate 8 and optimize during MC lowering, NFCI
ClosedPublic

Authored by skan on May 19 2023, 2:54 AM.

Details

Summary

This is follow-up of D150107.

In addition, the function X86::optimizeToFixedRegisterOrShortImmediateForm can be
shared with project bolt and eliminates the code in X86InstrRelaxTables.cpp.

Diff Detail

Event Timeline

skan created this revision.May 19 2023, 2:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 2:54 AM
skan requested review of this revision.May 19 2023, 2:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 2:54 AM
skan edited the summary of this revision. (Show Details)May 19 2023, 2:57 AM
skan added a comment.May 19 2023, 3:10 AM

This change is straightforward to me. I tend to land it first to avoid more tests for ADD/AND/OR/SUB/XOR/CMP with i8 being added. The update in llvm/test/CodeGen/X86/avxvnni-combine.ll is due to the impact on machine schedule.
Opened a revision here for possible discussions.

This revision was not accepted when it landed; it landed in state Needs Review.May 19 2023, 3:22 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.