[PATCH] D80208: [CodeGen] Add support for extracting elements of scalable vectors
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 21 02:08:38 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5374
// expanding copies of large vectors from registers.
- if (N2C &&
- N1.getOpcode() == ISD::CONCAT_VECTORS &&
- N1.getNumOperands() > 0) {
+ if (N2C && N1.getOperand(0).getValueType().isFixedLengthVector() &&
+ N1.getOpcode() == ISD::CONCAT_VECTORS && N1.getNumOperands() > 0) {
----------------
Please note why this doesn't work for scalable vectors.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5428
if (N1.getOpcode() == ISD::EXTRACT_SUBVECTOR &&
+ N1.getValueType().isFixedLengthVector() &&
N1.getValueType().getVectorNumElements() == 1) {
----------------
Please note why this doesn't work for scalable vectors.
================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:1875
+ (INDEX_II_B 0, 1),
+ (DUP_ZR_B (i32 (EXTRACT_SUBREG GPR64:$index, sub_32)))),
+ ZPR:$vec)>;
----------------
Maybe better to use `lastb(whilels(0, idx), vec)` or something like that?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80208/new/
https://reviews.llvm.org/D80208
More information about the llvm-commits
mailing list