[all-commits] [llvm/llvm-project] 00eff9: [RISCV] Add missing patterns for rotr with immedia...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue Nov 3 10:05:57 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 00eff96e1d02969ff1c1416a266b4d29506cd1c0
https://github.com/llvm/llvm-project/commit/00eff96e1d02969ff1c1416a266b4d29506cd1c0
Author: Craig Topper <craig.topper at sifive.com>
Date: 2020-11-03 (Tue, 03 Nov 2020)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
M llvm/lib/Target/RISCV/RISCVInstrInfoB.td
M llvm/test/CodeGen/RISCV/rv32Zbbp.ll
M llvm/test/CodeGen/RISCV/rv32Zbp.ll
M llvm/test/CodeGen/RISCV/rv64Zbbp.ll
M llvm/test/CodeGen/RISCV/rv64Zbp.ll
Log Message:
-----------
[RISCV] Add missing patterns for rotr with immediate for Zbb/Zbp extensions.
DAGCombine doesn't canonicalize rotl/rotr with immediate so we
need patterns for both.
Remove the custom matcher for rotl to RORI and just use a SDNodeXForm
to convert the immediate instead. Doing this gives priority to the
rev32/rev16 versions of grevi over rori since an explicit immediate
is more precise than any immediate. I also added rotr patterns for
rev32/rev16. And removed the (or (shl), (shr)) patterns that should be
combined to rotl by DAG combine.
There is at least one other grev pattern that probably needs a
another rotr pattern, but we need more test coverage first.
Differential Revision: https://reviews.llvm.org/D90575
More information about the All-commits
mailing list