[PATCH] D137106: [RISCV] Fix crash a vector add has a 4x sext and zext operand.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 14:33:10 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:8459
+    if (!SExt.has_value())
+      return OrigOperand;
+
----------------
qcolombet wrote:
> That part shouldn't be needed. The `getSource()` should do the right thing.
> I believe the reason it doesn't is because the `NodeExtensionHelper` got out-of-sync with the actual operand, maybe when we commute the operand of VWADD_W?
> 
> Let me check something.
I don't think it had anything to with commuting. I think we lost track of the fact that we were matching to VWADDU_W and didn't want to look through the VSEXT_VL that was on the LHS. In this function we were acting based only on the opcode of the operand and not what pattern we were matching.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137106



More information about the llvm-commits mailing list