Skip to content

Commit 3656558

Browse files
author
Krzysztof Parzyszek
committed
[Hexagon] Only allow single HVX vector loads/stores in lowering
This will prevent store widening from forming vector pair stores, which eventually end up broken up into single stores.
1 parent 103678d commit 3656558

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ HexagonTargetLowering::allowsHvxMemoryAccess(MVT VecTy, unsigned Alignment,
304304
MachineMemOperand::Flags Flags, bool *Fast) const {
305305
// Bool vectors are excluded by default, but make it explicit to
306306
// emphasize that bool vectors cannot be loaded or stored.
307+
// Also, disallow double vector stores (to prevent unnecessary
308+
// store widening in DAG combiner).
309+
if (VecTy.getSizeInBits() > 8*Subtarget.getVectorLength())
310+
return false;
307311
if (!Subtarget.isHVXVectorType(VecTy, /*IncludeBool=*/false))
308312
return false;
309313
if (Fast)

0 commit comments

Comments
 (0)