[PATCH] D67423: [RISCV] Consistently use Register arithmetic
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 17:54:48 PDT 2019
luismarques marked an inline comment as done.
luismarques added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2116
// Second half of f64 is passed in another GPR.
+ assert(RegLo < RISCV::X31 && "Invalid register pair");
Register RegHigh = RegLo + 1;
----------------
jrtc27 wrote:
> For completeness you probably want to prepend `RegLo >= RISCV::X0` (or `>` I guess... though at that point you could then argue for `>= RISCV::X10` so I'd just say go with `>= RISCV::X0` as the simplest thing that's clearly just an "is this a GPR" check).
That wasn't a check for GPRness, but instead that the `+ 1` didn't overflow the register class (if you were implementing some weird ABI, I guess).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67423/new/
https://reviews.llvm.org/D67423
More information about the llvm-commits
mailing list