[PATCH] D98091: [RISCV] Make use of DAG.getNeutralElement in lowerVECREDUCE to avoid repeating the same list of constants. NFC

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 6 17:23:52 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2424
   MVT VecEltVT = VecVT.getVectorElementType();
-  unsigned RVVOpcode;
-  uint64_t IdentityVal;
-  std::tie(RVVOpcode, IdentityVal) =
-      getRVVReductionOpAndIdentityVal(Op.getOpcode(), VecEltVT.getSizeInBits());
+  unsigned RVVOpcode = getRVVReductionOpAndIdentityVal(Op.getOpcode());
   MVT M1VT = getLMUL1VT(VecVT);
----------------
khchen wrote:
> maybe the function name should be changed because it does not get IdentityVal now?
Oops. Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98091



More information about the llvm-commits mailing list