Remove restriction disallowing merging of stores vector loads into
larger store of larger vector load.
Reviewers: RKSimon, efriedma, spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36158
llvm-svn: 309951
if (!IsConstantSrc && !IsLoadSrc && !IsExtractVecSrc)
return false;
- // Don't merge vectors into wider vectors if the source data comes from loads.
- // TODO: This restriction can be lifted by using logic similar to the
- // ExtractVecSrc case.
- if (MemVT.isVector() && IsLoadSrc)
- return false;
-
SmallVector<MemOpLink, 8> StoreNodes;
// Find potential store merge candidates by searching through chain sub-DAG
getStoreMergeCandidates(St, StoreNodes);
ret void
; CHECK-LABEL: merge_vec_stores_from_loads
-; CHECK: vmovaps
-; CHECK-NEXT: vmovaps
-; CHECK-NEXT: vmovaps
-; CHECK-NEXT: vmovaps
+; CHECK: vmovups (%rdi), %ymm0
+; CHECK-NEXT: vmovups %ymm0, (%rsi)
+; CHECK-NEXT: vzeroupper
; CHECK-NEXT: retq
}