[PATCH] D86894: [SVE] Disable INSERT_SUBVECTOR DAGCombine for scalable vectors
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 14:47:49 PDT 2020
cameron.mcinally updated this revision to Diff 289026.
cameron.mcinally added a comment.
Ok, I guess that makes sense. So if we're considering Min elements, should we just overload % then?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86894/new/
https://reviews.llvm.org/D86894
Files:
llvm/include/llvm/Support/TypeSize.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -20593,7 +20593,7 @@
SDLoc DL(N);
SDValue NewIdx;
LLVMContext &Ctx = *DAG.getContext();
- unsigned NumElts = VT.getVectorNumElements();
+ ElementCount NumElts = VT.getVectorElementCount();
unsigned EltSizeInBits = VT.getScalarSizeInBits();
if ((EltSizeInBits % N1SrcSVT.getSizeInBits()) == 0) {
unsigned Scale = EltSizeInBits / N1SrcSVT.getSizeInBits();
Index: llvm/include/llvm/Support/TypeSize.h
===================================================================
--- llvm/include/llvm/Support/TypeSize.h
+++ llvm/include/llvm/Support/TypeSize.h
@@ -48,6 +48,9 @@
assert(Min % RHS == 0 && "Min is not a multiple of RHS.");
return { Min / RHS, Scalable };
}
+ ElementCount operator%(unsigned RHS) {
+ return { Min % RHS, Scalable };
+ }
bool operator==(const ElementCount& RHS) const {
return Min == RHS.Min && Scalable == RHS.Scalable;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86894.289026.patch
Type: text/x-patch
Size: 1144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200831/3e06ed97/attachment.bin>
More information about the llvm-commits
mailing list