forked from OSchip/llvm-project
[CodeGen][SVE] Avoid scalarizing zero splat stores on scalable vectors.
Summary: Implemented in replaceZeroVectorStore(). Fixes several warnings in AArch64 SVE unit tests. Reviewers: sdesmalen, kmclaughlin, dancgr, efriedma, each, andwar, rengolin Reviewed By: sdesmalen Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80824
This commit is contained in:
parent
8233439fdb
commit
4dcc0d1958
|
@ -12069,6 +12069,10 @@ static SDValue replaceZeroVectorStore(SelectionDAG &DAG, StoreSDNode &St) {
|
|||
SDValue StVal = St.getValue();
|
||||
EVT VT = StVal.getValueType();
|
||||
|
||||
// Avoid scalarizing zero splat stores for scalable vectors.
|
||||
if (VT.isScalableVector())
|
||||
return SDValue();
|
||||
|
||||
// It is beneficial to scalarize a zero splat store for 2 or 3 i64 elements or
|
||||
// 2, 3 or 4 i32 elements.
|
||||
int NumVecElts = VT.getVectorNumElements();
|
||||
|
|
Loading…
Reference in New Issue