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

Zakk Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 6 17:22:14 PST 2021


khchen 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);
----------------
maybe the function name should be changed because it does not get IdentityVal now?


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