[PATCH] D120467: [RISCV] Optimize (sext.w, srli) to sraiw with Zba.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 24 09:03:54 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:773
+        // Dealing with this situation, skip if has sext.w x with Zba.
+        bool Skip = Subtarget->hasStdExtZba() &&
+                    X.getOpcode() == ISD::SIGN_EXTEND_INREG;
----------------
Don't you also need to check that C3 is 32?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120467



More information about the llvm-commits mailing list