This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add i32 as a legal type for GPR register class.
ClosedPublic

Authored by craig.topper on May 22 2023, 8:42 PM.

Details

Summary

I'm investigating if it is feasible to have i32 as a legal type for RV64.
The first thing we need to do is make i32 a valid type for the GPR
register class.

Unfortunately, this disables a lot of type inferencing in tablegen
and requires us to explicitly add XLenVT to many isel patterns.

This might also allow us to get rid of the GPRF16/32/64 register class
from Zhinx/Zfinx/Zdinx by adding f16/f32/f64 to GPR type. Those classes
appear to only exist for type inference purposes today. In all other ways
they are identical to the GPR class.

Diff Detail

Event Timeline

craig.topper created this revision.May 22 2023, 8:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 8:42 PM
craig.topper requested review of this revision.May 22 2023, 8:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 8:42 PM
sunshaoce accepted this revision.Jun 23 2023, 11:11 AM

I think if this contributes to achieving a similar effect as D153110 and further simplifies the Z*inx-related code, then it should be accepted.

This revision is now accepted and ready to land.Jun 23 2023, 11:11 AM