This is an archive of the discontinued LLVM Phabricator instance.

[CSKY] Optimize ANDI/ORI to BSETI/BCLRI for specific immediates
AbandonedPublic

Authored by benshi001 on Jun 26 2023, 3:19 AM.

Details

Reviewers
zixuan-wu

Diff Detail

Unit TestsFailed

Event Timeline

benshi001 created this revision.Jun 26 2023, 3:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 3:19 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
benshi001 requested review of this revision.Jun 26 2023, 3:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 3:19 AM
benshi001 added inline comments.Jun 26 2023, 3:28 AM
llvm/test/CodeGen/CSKY/bseti_bclri.ll
25

This is not optimized to two BSETI due to the immediate can be encoded to ORI32.

34

This is not optimized to two BSETI due to the immediate can be encoded to ORI32.

43

This is not optimized to two BSETIs due to the immediate can be composed via a single MOVIH32.

68

This is not optimized to two BSETIs due to the immediate is used twice.

96

This is not optimized to two BCLRI due to the immediate can be encoded into ANDNI.

103

This is not optimized to two BCLRI due to the immediate can be encoded into ANDNI.

134

This is not optimized to two BCLRI32 due to the immediate is used twice.

benshi001 updated this revision to Diff 536717.Jul 3 2023, 4:23 AM