[PATCH] D41949: [RISCV] implement li pseudo instruction
Mario Werner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 17 07:33:05 PDT 2018
niosHD marked an inline comment as done.
niosHD added a comment.
In https://reviews.llvm.org/D41949#1069751, @asb wrote:
> I'll think more about compression handling. If you already have something that works, it might be worth just posting that so we have something concrete to discuss.
Great, I will post it and then we can continue the discussion in the new review thread.
================
Comment at: lib/Target/RISCV/RISCVISelDAGToDAG.cpp:196
+
+ int64_t Hi42 = (Const->getSExtValue() + 0x800) & ~0xFFF;
+ SDValue HiVal = CurDAG->getTargetConstant(Hi42, SDLoc(ImmOperand),
----------------
asb wrote:
> Perhaps I'm missing something obvious, but shouldn't this be 'Hi52'?
Indeed, good catch! This is a stupid copy and paste error which, to my embarrassment, originates from the new `emitRISCVLoadImm` function...
I'll fix this immediately and refresh the patch.
https://reviews.llvm.org/D41949
More information about the llvm-commits
mailing list