[PATCH] D116574: [RISCV] Materializing constants with 'rori'
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 12:11:28 PST 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp:337
+ RISCVMatInt::InstSeq TmpSeq;
+ int NegImm12 = (uint64_t)Val >> (64 - Rotate) | (uint64_t)Val << Rotate;
+ assert(isInt<12>(NegImm12));
----------------
Use int64_t here so that no bits are dropped. That will make the assert isInt<12> assert more accurate too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116574/new/
https://reviews.llvm.org/D116574
More information about the llvm-commits
mailing list