[llvm] 3656558 - [Hexagon] Only allow single HVX vector loads/stores in lowering
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 14 12:26:21 PDT 2020
Author: Krzysztof Parzyszek
Date: 2020-03-14T14:26:01-05:00
New Revision: 3656558cecafd458ae63a5ef70758832f239b26d
URL: https://github.com/llvm/llvm-project/commit/3656558cecafd458ae63a5ef70758832f239b26d
DIFF: https://github.com/llvm/llvm-project/commit/3656558cecafd458ae63a5ef70758832f239b26d.diff
LOG: [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.
Added:
Modified:
llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp b/llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
index 5ab000df2db0..0242bfcea7de 100644
--- a/llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
@@ -304,6 +304,10 @@ HexagonTargetLowering::allowsHvxMemoryAccess(MVT VecTy, unsigned Alignment,
MachineMemOperand::Flags Flags, bool *Fast) const {
// Bool vectors are excluded by default, but make it explicit to
// emphasize that bool vectors cannot be loaded or stored.
+ // Also, disallow double vector stores (to prevent unnecessary
+ // store widening in DAG combiner).
+ if (VecTy.getSizeInBits() > 8*Subtarget.getVectorLength())
+ return false;
if (!Subtarget.isHVXVectorType(VecTy, /*IncludeBool=*/false))
return false;
if (Fast)
More information about the llvm-commits
mailing list