Page MenuHomePhabricator

[RISCV] Form GORCI from (or (rotl/rotr X, Bitwidth/2), X).

Authored by craig.topper on Nov 29 2020, 1:49 PM.



A rotate by half the bitwidth swaps the bottom and top half which is the same as one of the MSB GREVI stage.

We have to do this as a special combine because we prefer to keep (rotl/rotr X, BitWidth/2) as a rotate rather than a single stage GREVI.

Diff Detail

Event Timeline

craig.topper created this revision.Nov 29 2020, 1:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2020, 1:49 PM
craig.topper requested review of this revision.Nov 29 2020, 1:49 PM

It might be worth mentioning somewhere (the commit message?) why this isn't done by matching (rotl/rotr X, Bitwidth/2) as GREVI and then matching GORCI through that. Presumably we'd like to match GREVI of rotl/rotr too, for instance?

craig.topper edited the summary of this revision. (Show Details)


This revision is now accepted and ready to land.Dec 7 2020, 8:49 AM