[PATCH] D100288: [RISCV] Add vector types to GPR for P extension and explict type to codegen patterns
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 13 11:13:08 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:936
+def : Pat<(XLenVT (setne (XLenVT GPR:$rs1), 0)), (SLTU (XLenVT X0), GPR:$rs1)>;
+def : Pat<(XLenVT (setne (XLenVT GPR:$rs1), (XLenVT GPR:$rs2))),
+ (SLTU (XLenVT X0), (XOR GPR:$rs1, GPR:$rs2))>;
----------------
This should only need XLenVT on either $rs1 or $rs2. You don't need it on both.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:959
valty:$truev, valty:$falsev),
- [(set valty:$dst, (riscv_selectcc cmpty:$lhs, cmpty:$rhs,
- (XLenVT imm:$imm), valty:$truev, valty:$falsev))]>;
+ [(set valty:$dst, (riscv_selectcc (cmpvt cmpty:$lhs), (cmpvt cmpty:$rhs),
+ (XLenVT imm:$imm), (valvt valty:$truev), (valvt valty:$falsev)))]>;
----------------
I think you only need this on one of $lhs and $rhs and one of $truev and $falsev.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.td:968
class BccPat<CondCode Cond, RVInstB Inst>
- : Pat<(riscv_brcc GPR:$rs1, GPR:$rs2, Cond, bb:$imm12),
+ : Pat<(riscv_brcc (XLenVT GPR:$rs1), (XLenVT GPR:$rs2), Cond, bb:$imm12),
(Inst GPR:$rs1, GPR:$rs2, simm13_lsb0:$imm12)>;
----------------
Should only need this on one of $rs1 and $rs2
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100288/new/
https://reviews.llvm.org/D100288
More information about the llvm-commits
mailing list