[PATCH] D66718: [DAGCombiner] (insert_vector_elt (vector_shuffle X, Y), (extract_vector_elt X, N), IdxC) -> (vector_shuffle X, Y)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 10:02:26 PDT 2019
- Previous message: [PATCH] D66718: [DAGCombiner] (insert_vector_elt (vector_shuffle X, Y), (extract_vector_elt X, N), IdxC) -> (vector_shuffle X, Y)
- Next message: [PATCH] D66718: [DAGCombiner] (insert_vector_elt (vector_shuffle X, Y), (extract_vector_elt X, N), IdxC) -> (vector_shuffle X, Y)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16451
+ if (Offset != -1) {
+ SmallVector<int, 16> NewMask(SVN->getMask().begin(), SVN->getMask().end());
+
----------------
You already have this at line 16438:
```
ArrayRef<int> Mask = SVN->getMask()
```
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16456
+
+ return DAG.getVectorShuffle(Vec.getValueType(), SDLoc(N),
+ Vec.getOperand(0), Vec.getOperand(1),
----------------
You need to check NewMask is legal: if (!TLI.isShuffleMaskLegal(NewMask, Vec.getValueType()))
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66718/new/
https://reviews.llvm.org/D66718
- Previous message: [PATCH] D66718: [DAGCombiner] (insert_vector_elt (vector_shuffle X, Y), (extract_vector_elt X, N), IdxC) -> (vector_shuffle X, Y)
- Next message: [PATCH] D66718: [DAGCombiner] (insert_vector_elt (vector_shuffle X, Y), (extract_vector_elt X, N), IdxC) -> (vector_shuffle X, Y)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list