[PATCH] D138025: [RISCV] Make lowerVECTOR_SHUFFLEAsVSlidedown follow source until not EXTRACT_SUBVECTOR.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 21:12:22 PST 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2948
+ Parent.getOperand(0).getSimpleValueType().isFixedLengthVector()) {
+ Idx.push_back(Parent.getConstantOperandVal(1));
+ Parent = Parent.getOperand(0);
----------------
Can we accumulate the indices into a single value here instead of putting them in a vector?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2969
+ auto [RebuildIndex, StartOffset] =
+ static_cast<uint64_t>(NewMask[i]) < NewMask.size()
+ ? std::make_pair(ArrayRef<uint64_t>(V1Index),
----------------
unsigned is probably sufficient. I don't think you need uint64_t
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2970
+ static_cast<uint64_t>(NewMask[i]) < NewMask.size()
+ ? std::make_pair(ArrayRef<uint64_t>(V1Index),
+ static_cast<size_t>(0))
----------------
Use makeArrayRef
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2972
+ static_cast<size_t>(0))
+ : std::make_pair(ArrayRef<uint64_t>(V2Index), NewMask.size());
+ // StartOffset is needed. Otherwise, the b case would be <5,6,7,12> instead
----------------
makeArrayRef
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138025/new/
https://reviews.llvm.org/D138025
More information about the llvm-commits
mailing list