This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Remove isel patterns for Zbs *W instructions.
ClosedPublic

Authored by craig.topper on Jan 23 2021, 7:59 PM.

Details

Summary

These instructions have been removed from the 0.94 bitmanip spec.
We should focus on optimizing the codegen without using them.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 23 2021, 7:59 PM
craig.topper requested review of this revision.Jan 23 2021, 7:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2021, 7:59 PM
Herald added a subscriber: MaskRay. · View Herald Transcript

Is there value in still having most of these tests without the pattern? Some of these now look like tests just of andn, and in others now that enabling b or zbs has no effect on code generation. I wonder if this change should instead just completely remove the edited tests. If future additions make them relevant again they could later be readded.

Is there value in still having most of these tests without the pattern? Some of these now look like tests just of andn, and in others now that enabling b or zbs has no effect on code generation. I wonder if this change should instead just completely remove the edited tests. If future additions make them relevant again they could later be readded.

I think all of these tests also exist in rv32Zbs.ll without the signext attributes. So there is some value for the comparison between rv32 and rv64. I might start looking at optimizing some of these soon though we're likely to need 3 instructions to use the non-W instructions so I'm not sure its worth optimizing all of them.

I put this patch up now because I thought it might make sense to not having llvm 12 emitting instructions we knew were going away.

asb accepted this revision.Jan 28 2021, 5:28 AM

LGTM. It might be worth adding a comment where the patterns were removed to explain we don't have ISel patterns for those instructions because they've been removed from the 0.94 spec (just in case someone starts looking to add them, having not followed upstream development closely).

This revision is now accepted and ready to land.Jan 28 2021, 5:28 AM