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.
Paths
| Differential D92286
[RISCV] Form GORCI from (or (rotl/rotr X, Bitwidth/2), X). ClosedPublic Authored by craig.topper on Nov 29 2020, 1:49 PM.
Details Summary 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
Unit TestsFailed
Event TimelineComment Actions 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? This revision is now accepted and ready to land.Dec 7 2020, 8:49 AM Closed by commit rG5c819eb38935: [RISCV] Form GORCI from (or (rotl/rotr X, Bitwidth/2), X). (authored by craig.topper). · Explain WhyDec 7 2020, 10:31 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 308229 llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rv32Zbp.ll
llvm/test/CodeGen/RISCV/rv64Zbp.ll
|
clang-format not found in user's PATH; not linting file.