[llvm] r324243 - [Hexagon] Don't use garbage mask in HvxSelector::shuffp2
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 07:46:41 PST 2018
Author: kparzysz
Date: Mon Feb 5 07:46:41 2018
New Revision: 324243
URL: http://llvm.org/viewvc/llvm-project?rev=324243&view=rev
Log:
[Hexagon] Don't use garbage mask in HvxSelector::shuffp2
The function shuffp2 was breaking up a wide shuffle into a pair of
narrower ones, except that the narrower shuffle masks were actually
uninitialized.
Modified:
llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
Modified: llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp?rev=324243&r1=324242&r2=324243&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp Mon Feb 5 07:46:41 2018
@@ -1271,6 +1271,8 @@ OpRef HvxSelector::shuffp2(ShuffleMask S
return shuffp1(ShuffleMask(PackedMask), P, Results);
SmallVector<int,256> MaskL(VecLen), MaskR(VecLen);
+ splitMask(SM.Mask, MaskL, MaskR);
+
OpRef L = shuffp1(ShuffleMask(MaskL), Va, Results);
OpRef R = shuffp1(ShuffleMask(MaskR), Vb, Results);
if (!L.isValid() || !R.isValid())
More information about the llvm-commits
mailing list