This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Remove sext_inreg+riscv_grev/riscv_gorc isel patterns.
ClosedPublic

Authored by Jimerlife on Apr 11 2022, 8:24 PM.

Details

Summary

Use binop_allwusers and doPeepholeSExtW to Remove sext_inreg+riscv_grev/riscv_gorc isel patterns.
There is special when Imm is 7, becase of existing two patterns:
Pat<(riscv_gorc GPR:$rs1, 7), (ORC_B GPR:$rs1)>,
Pat<(riscv_grev GPR:$rs1, 7), (BREV8 GPR:$rs1).
So I still keep sext_inreg+riscv_grev/riscv_gorc when imm is 7.

Diff Detail

Event Timeline

Jimerlife created this revision.Apr 11 2022, 8:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 8:24 PM
Jimerlife requested review of this revision.Apr 11 2022, 8:24 PM
craig.topper accepted this revision.Apr 11 2022, 9:17 PM

LGTM.

Though I wonder at what point we should delete all code for non-ratified bitmanip ISAs. The Bitmanip task group doesn't appear to be active anymore so these instructions may never become official and the opcodes may get claimed for something else.

This revision is now accepted and ready to land.Apr 11 2022, 9:17 PM

Though I wonder at what point we should delete all code for non-ratified bitmanip ISAs. The Bitmanip task group doesn't appear to be active anymore so these instructions may never become official and the opcodes may get claimed for something else.

Yeah I've been wondering about that too. Feels like nobody's sure. Only yesterday I noticed that spike supports these non-ratified ones as a custom Xbitmanip (XZbp etc) extension(s). Not that that's a reason to keep them, it's just an interesting data point.

This revision was landed with ongoing or failed builds.Apr 14 2022, 1:30 AM
This revision was automatically updated to reflect the committed changes.