[PATCH] D108916: [RISCV] Optimize (add (shl x, c0), (shl y, c1)) with SH*ADD

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 05:15:08 PDT 2021


luismarques requested changes to this revision.
luismarques added a comment.
This revision now requires changes to proceed.

I had started reviewing this before D109729 <https://reviews.llvm.org/D109729>, now I'm very confused about the point of the two patches...



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:5773-5774
+  EVT VT = N->getValueType(0);
+  if (VT.isVector() || VT.getSizeInBits() > Subtarget.getXLen())
+    return SDValue();
+
----------------
See craig's comment in D109729: The `VT.getSizeInBits() > Subtarget->getXLen()` should never fail. If the VT is scalar it must be XLenVT.


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

https://reviews.llvm.org/D108916



More information about the llvm-commits mailing list