This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][GISel] Make s32 a legal type for RV64 for any operation that has a W version.
ClosedPublic

Authored by craig.topper on Aug 11 2023, 7:58 PM.

Details

Summary

My thought is that we can directly select W instructions using s32.

This will likely require combines and other optimizations eventually,
but this makes a simple starting point.

I'm slowly prototyping a similar approach for SelectionDAG.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 11 2023, 7:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2023, 7:58 PM
craig.topper requested review of this revision.Aug 11 2023, 7:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2023, 7:58 PM
reames accepted this revision.Aug 14 2023, 9:22 AM

LGTM

For context, Craig and I chatted about general directions here for a good while on Friday. This is not a high confidence statement that we'll definitely end up with i32 legal on RV64. It's instead a low confidence guess as to where SDAG will be in about a year. If it turns out we're wrong, we'll reverse direction and move GISEL towards the current model that SDAG is using. We're so far from O3 code quality on GISEL that we don't expect to hit the code quality questions in practice to well beyond that rough 1yr timeline.

So basically, if you're looking at this later and think we went the wrong direction, it's entirely possible you're right.

This revision is now accepted and ready to land.Aug 14 2023, 9:22 AM
This revision was landed with ongoing or failed builds.Aug 19 2023, 11:21 AM
This revision was automatically updated to reflect the committed changes.