[PATCH] D79690: [RISCV] Fold ADDIs into load/stores with nonzero offsets

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 11 03:10:59 PDT 2020


lenary added a comment.

This is looking like a good improvement, thanks @luismarques!

I just have one question about the `ConstantSDNode` part of the change.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:219-224
+      int64_t Offset1 = Const->getSExtValue();
+      int64_t CombinedOffset = Offset1 + Offset2;
+      if (!isInt<12>(CombinedOffset))
+        continue;
+      ImmOperand = CurDAG->getTargetConstant(CombinedOffset, SDLoc(ImmOperand),
+                                             ImmOperand.getValueType());
----------------
I don't understand where this code is being tested. Can you point to a testcase that changes because of this change?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79690/new/

https://reviews.llvm.org/D79690





More information about the llvm-commits mailing list